The chemical doping of graphene is a promising route to improve the performances of graphene-based devices through enhanced chemical reactivity, catalytic activity, or transport characteristics. Understanding the interaction of molecules with doped graphene at the atomic scale is therefore a leading challenge to be overcome for the development of graphene-based electronics and sensors. Here, we use scanning tunneling microscopy and spectroscopy to study the electronic interaction of pristine and nitrogen-doped graphene with self-assembled tetraphenylporphyrin molecules. We provide an extensive measurement of the electronic structure of single porphyrins on Au(111), thus revealing an electronic decoupling effect of the porphyrins adsorbed on graphene. A tip-induced switching of the inner hydrogen atoms of porphyrins, first identified on Au(111), is observed on graphene, allowing the identification of the molecular conformation of porphyrins in the self-assembled molecular layer. On nitrogen-doped graphene, a local modification of the charge transfer around the nitrogen sites is evidenced via a downshift of the energies of the molecular elecronic states. These data show how the presence of nitrogen atoms in the graphene network modifies the electronic interaction of organic molecules with graphene. These results provide a basic understanding for the exploitation of doped graphene in molecular sensors or nanoelectronics.