Polypyrrole (PPy) is a polymer widely used as an extraction phase due to its ability to perform intermolecular interactions with the analyte, such as acid-base, π-π, dipole-dipole, hydrophobic, and hydrogen bonding. In this manuscript, we report the coating of a stainless steel needle with a PPy film for analyte extraction and subsequent analysis by electrospray ionization mass spectrometry (ESI-MS) under ambient and open-air conditions. The method, named PPy-ESI-MS, was optimized for analysis of 3,4-methylenedioxyamphetamine (MDA) and 3,4-methylenedioxymethamphetamine (MDMA) in synthetic urine. Seven cycles of electrodeposition of the PPy film onto the needle surface, sample at pH 8, and 40 min of extraction of analytes were determined as the best analysis conditions. The analytical performance of PPy-ESI-MS was evaluated for MDA and MDMA compounds. Analytical curves were obtained with R2 > 0.98. Limits of detection (LODs) and limits of quantification (LOQs) were determined as 20 μg L-1 and 70 μg L-1 for MDA and as 25 μg L-1 and 80 μg L-1 for MDMA, respectively. Values of precision were below 17%, and values of accuracy below 5%. The apparent recoveries ranged between 84.5% and 111.3%. In addition, the PPy-ESI-MS method was applied for the analysis of sarcosine in synthetic urine in order to evaluate the performance of the method for another class of compounds. The calibration curve was obtained with R2 > 0.98, along with LOD and LOQ of 30 μg L-1 and 100 μg L-1, respectively. The precision and accuracy values were below 5% and 8%, respectively, and the apparent recoveries close to 100%. This work demonstrates the usefulness of combining an extraction phase with ESI-MS analysis under ambient conditions to determine different classes of small molecules in a complex sample.