I'll tell you how to move between Dirichlet characters and finite-order Hecke characters (which is what your question seems to be). Let $\chi:(\mathbf{Z}/N)^\times\rightarrow\mathbf{C}^\times$ be a Dirichlet character. It induces a Dirichlet character $\chi_M:(\mathbf{Z}/M)^\times\rightarrow\mathbf{C}^\times$ for $M$ divisible by $N$ by composing with the canonical projection. You can take the inverse limit $$\widehat{\chi}:=\underset{\longleftarrow}{\lim}\chi_M:\widehat{\mathbf{Z}}^\times=\underset{\longleftarrow}{\lim}(\mathbf{Z}/M)^\times\rightarrow\mathbf{C}^\times.$$ One has the following isomorphism $$I\cong\mathbf{Q}^\times\times\mathbf{R}^\times_{>0}\times\widehat{\mathbf{Z}}^\times$$ given by $$x\mapsto \left(\frac{x_\infty}{|x|},|x|,\frac{x^{(\infty)}}{x_\infty}|x|\right).$$ Note that $\mathbf{Q}^\times\subseteq I$ maps to the factor $\mathbf{Q}^\times$ on the right. Then you can obtain a character $\omega_\chi:I\rightarrow\mathbf{C}^\times$ by composing $\widehat{\chi}$ with the projection to $\widehat{\mathbf{Z}}^\times$ in the above isomorphism. This will give you a character of $I$ trivial on $\mathbf{Q}^\times$ and hence a Hecke character which is finite order by construction. Conversely, given a finite order Hecke character $\omega:I/\mathbf{Q}^\times\rightarrow\mathbf{C}^\times$ use the above isomorphism to view it as a finite order character of $\mathbf{R}^\times_{>0}\times\widehat{\mathbf{Z}}$. The only finite order character on $\mathbf{R}^\times$ is the trivial character so $\omega$ induces a finite order character $\widehat{\mathbf{Z}}^\times\rightarrow\mathbf{C}^\times$. Since it's finite order it factors through some finite quotient and gives you a Dirichlet character $\chi_\omega:(\mathbf{Z}/N)^\times\rightarrow\mathbf{C}^\times$. The first section of Hida's book *Modular forms and Galois cohomology* covers this material.