We investigated the metalation and coordination reactions of Co with 2H-5,15-bis(para-cyanophenyl)-10,20-bisphenylporphyrin (2HtransDCNPP) on a Ag(111) surface by scanning tunneling microscopy. At room temperature (RT), 2HtransDCNPPs self-assemble into a supramolecular structure stabilized by intermolecular hydrogen bonding. The metalation of 2HtransDCNPP is achieved either by depositing Co atoms onto the supramolecular structure at RT, or, alternatively, by depositing the molecules onto a submonolayer Co-precovered Ag(111) surface with a subsequent heating to 500 K. In addition, the molecules coordinate to Co atoms through the N atoms in the peripheral cyano groups with a preference of isolated 4-fold coordination motifs at RT.