Given $a_{n}=\frac{2 \cdot 3^{n}}{3^{n}-1}$.
Analysis From $a_{n+1}=\frac{3^{n+1} a_{n}}{a_{n}+3^{n+1}}$, we know that $\frac{1}{a_{n+1}}=\frac{a_{n}+3^{n+1}}{3^{n+1} a_{n}}=\frac{1}{a_{n}}+\frac{1}{3^{n+1}}$.
$$
\frac{1}{a_{n}}=\frac{1}{a_{1}}+\left(\frac{1}{a_{2}}-\frac{1}{a_{1}}\right)+\cdots+\left(\frac{1}{a_{n}}-\frac{1}{a_{n-1}}\right)=\frac{1}{3}+\left(\frac{1}{3^{2}}+\frac{1}{3^{3}}+\cdots+\frac{1}{3^{n}}\right)=\frac{1}{3} \cdot \frac{1-\frac{1}{3^{n}}}{1-\frac{1}{3}}=\frac{3^{n}-1}{2 \cdot 3^{n}}
$$

Thus, $a_{n}=\frac{2 \cdot 3^{n}}{3^{n}-1}$, so the answer is $a_{n}=\frac{2 \cdot 3^{n}}{3^{n}-1}$.
8. Given the sequence $\left\{a_{n}\right\}$ satisfies $a_{n+1}=\frac{3^{n+1} a_{n}}{a_{n}+3^{n+1}}, a_{1}=3$, then the general term formula of the sequence $\left\{a_{n}\right\}$ is