Martingale representation using Ito If we consider a process $$X_T=e^{\int_0^TtdW_t}$$it holds that it can be expressed by $$X_T=\mathbb{E}[X_T]+\int_0^Th(t)dW_t$$but how do we derive this $h(t)$?
I calculated $\mathbb{E}[X_T]=e^{t^3/6}$, and defined a new process $$Z_T=e^{-T^3/6}X_T \qquad Z_0=1$$with the hope that I could then use the martingale representation theorem, but $Z_T$ is not a martingale, since by Itô we get $$dZ_T=-\frac{1}{2}T^2e^{-T^3/6}X_TdT+Te^{-T^3/6}dW_T$$which contains a drift term. How could we solve this?

Your formula is wrong you wrote $TdW_T$ which is $dlog(X_T)$, not $dX_T$
We have $$dZ_T=-\frac{1}{2}T^2e^{-T^3/6}X_TdT+e^{-T^3/6}dX_T$$
Do that instead : 
$$X_T=e^{Y_T}$$ with $$dY_T=TdW_T$$
Apply Ito's lemma on $X$
We have $$dX_T=e^{Y_T}dY_T+\frac{1}{2}e^{Y_T}d<Y_T,Y_T>=X_TdY_T+\frac{1}{2}X_Td<Y_T,Y_T>$$
Because 
$$d<Y_T,Y_T>=T^2dT$$
We have 
$$dX_T=X_TdY_T+\frac{1}{2}X_TT^2dT$$
Using the first equation ,
$$dZ_T=-\frac{1}{2}T^2e^{-T^3/6}X_TdT+e^{-T^3/6}(X_TdY_T+\frac{1}{2}X_TT^2dT)=e^{-T^3/6}X_TdY_T=TZ_TdW_T$$
which is what you want
