Here's an example with $g=2$ and $n=5$. Consider the hyperelliptic curve defined by the equation $$y^2=x^5-1$$ or to be more precise the corresponding desingularized projective curve. Now this is a Riemann surface of genus two and has an automorphism $(x,y)\mapsto(\zeta x,y)$ where $\zeta$ is a primitive fifth root of unity.
Because of Hurwitz's theorem this kind of construction via Riemann surface automorphisms cannot work when $n$ is large compared to $g$.
Added
Here's another example. Consider the Riemann surface corresponding to the curve $$y^2=x^5-x.$$ It has an order $8$ autmorphism $(x,y)\mapsto(\eta^2 x,\eta y)$ where $\eta$ is a primitive eighth root of unity (and so this genus two surface also has an automorphism of order $4$).

