Learning the art of exploiting the interplay between different units at the atomic scale is a fundamental step in the realization of functional nano-architectures and interfaces. In this context, understanding and controlling the magnetic coupling between molecular centers and their environment is still a challenging task. Here we present a combined experimental-theoretical work on the prototypical case of the bis(phthalocyaninato)-lanthanide(III) (LnPc2) molecular nanomagnets magnetically coupled to a Ni substrate. By means of X-ray magnetic circular dichroism we show how the coupling strength can be tuned by changing the Ln ion. The microscopic parameters of the system are determined by ab-initio calculations and then used in a spin Hamiltonian approach to interpret the experimental data. By this combined approach we identify the features of the spin communication channel: the spin path is first realized by the mediation of the external (5d) electrons of the Ln ion, keeping the characteristic features of the inner 4 f orbitals unaffected, then through the organic ligand, acting as a bridge to the external world.