If axions simultaneously have the scalar couplings to the nucleons and pseudoscalar couplings to the electrons, it may mediate a P , T -violating interaction between the electronic shell and nuclei in the molecules. The polyatomic molecule RaOH, which is considered a promising platform for the P , T -violation searches, is studied for its sensitivity to such interactions. Because of the long-range nature (on molecular scales) of the axion-mediated interaction, it is important whether the molecular parameter is sensitive to the vibration of the molecule. Our results imply that the impact of the vibrations on the axion-mediated electron-nucleon interaction in the molecule is similar to the impact on the short-range electron-nucleon scalar-pseudoscalar interaction studied earlier.