In[]:=
rules={Power[E,Complex[0,n_]*π*θ]:>
n
x
,s_*Power[E,Complex[0,n_]*π*θ]:>s*
n
x
};
In[]:=
poly=ax+x^2+cx^3+d
Out[]=
d+ax+
2
x
+c
3
x
In[]:=
p=poly/.x->Exp[θIPi]
Out[]=
d+a
πθ

+
2πθ

+c
3πθ

In[]:=
p/.rules
Out[]=
d+ax+
2
x
+c
3
x