First of all, be careful, you forgot a term in your expression of $\varphi{(n)} = n \left(1-\dfrac{1}{p_{1}}\right)...\left(1-\dfrac{1}{p_{k}}\right)$ : there is a $n$.
Developping the first formula, if $n = p_1^{\alpha_1}...p_n^{\alpha_n}$, then $\varphi{(n)} = p_1^{\alpha_1-1}(p_1-1)...p_n^{\alpha_n-1}(p_n-1).$
If $\varphi{(n)} = 12 = 2*2*3$, we only have to find all the possibilities for the $p_i$ and $\alpha_i$.
If $3$ is alone, it is a $p_i^{\alpha_i-1}$ term (otherwise it would be a $(p_i-1)$ term, and $p_i$ would be $4$, which isn't prime). It goes inevitably with a $(p_i-1)$ term of $2$.
We only have a $2$ left. Hence the only possible match for him is a $(2*1)$ since a $(1*2)$ would imply another $p_i = 3$. This yields $n = 36$ and is the unique possibility with $3$ not being paired.
$3$ can be paired with a $2$ to form a $6$. This $6$ is obviously a $(p_i-1)$ term, so $p_i$ is $7$, with multiplicity $1$ because $7$ is not in our list of factors. The last $2$ can exist in the form $(2*1)$ or $(1*2)$. This yields $n = 28$ and $21$ respectively. Let's not forget the possible $(1*1)$ that can happen in the second case since $2$ isn't a factor in this case. This gives us $n=42$.
Finally, there can exist a lonely $3*2*2$ term. Once again since $12$ is not prime, it is a $(p_i-1)$ term, with $p_i$ being $13$ with multiplicity $1$. But this is not over yet. Even if we have no factors left, we can still have a $(1*1)$ term, like before. If it is there, then $n = 26$. Otherwise, $n=13$.
The final list is : $13, 21, 26, 28, 36, 42$.