Let $f : \mathbb{R}^3\to \mathbb{R}$ be a continuous function of compact support. Its Fourier transform is
$$\mathfrak{F}[f](k)=\int f(x)e^{ikx}dx=\int f(x)\sum_{n=0}^\infty \dfrac{i^n}{n!}k_{a_1}\dots k_{a_n} x^{a_1}\cdots x^{a_n} dx,$$
thus if one defines $$F^{a_1\dots a_n}=\int x^{a_1}\cdots x^{a_n}f(x)dx,$$
one has that the Fourier transform is determined by these parameters
$$\mathfrak{F}[f](k)=\sum_{n=0}^\infty \dfrac{i^n}{n!} k_{a_1}\dots k_{a_n} F^{a_1\dots a_n}.$$
These parameters are called multipole moments of the function.
Now, on electrodynamics we have another idea of multipole moments. It is related to the spherical harmonics. Indeed if we have a function $f : \mathbb{R}^3\to \mathbb{R}$ we expand it as
$$f(r,\theta,\phi)=\sum_{l=0}^\infty \sum_{m=-l}^l C_{lm}(r) Y_{lm}(\theta,\phi),$$
and we call $C_{lm}(r)$ the multipole moments of $f$.
One example would be the well-known formula
$$\dfrac{1}{|\mathbf{x}-\mathbf{x}'|}=4\pi \sum_l \sum_m \dfrac{1}{2l+1}\dfrac{r_<^l}{r_>^{l+1}}Y_{lm}^\ast(\theta',\phi')Y_{lm}(\theta,\phi),$$
which gives the moments
$$C_{lm}(r)=\dfrac{4\pi}{2l+1}\dfrac{r_<^l}{r_>^{l+1}}Y_{lm}^\ast(\theta',\phi').$$
My question is: how are these two definitions of multipole moments related? Are they even the same thing? Because in the way these two definitions are presented they seem to be really different. I want to see the connection in a general case, not just examples of how specific $2^n$-pole moments of either definitions are related.