We developed a droplet-based optofluidic system for the detection of foodborne pathogens. Specifically, the loop-mediated isothermal amplification (LAMP) technique was combined with surface-enhanced Raman scattering (SERS), which offers an excellent method for DNA ultradetection. However, the direct SERS detection of DNA compromises the simplicity of data interpretation due to the variability of its SERS fingerprints. Therefore, we designed an indirect SERS detection method using multifunctional gold nanoparticles (AuNPs) based on the formation of pyrophosphate generated during the DNA amplification by LAMP. Towards this goal, we prepared multifunctional AuNPs involving three components with key roles: (1) thiolated poly(ethylene glycol) as stabilizing agent, (2) 1-naphthalenethiol as Raman reporter, and (3) glutathione as a bioinspired chelating agent of magnesium (II) ions. Thus, the variation in the SERS signal of 1-naphthalenethiol was controlled by the aggregation of AuNPs triggered by the complexation of pyrophosphate and glutathione with free magnesium ions. Using this strategy, we detected Listeria monocytogenes, not only in buffer, but also in a food matrix (i.e., ultra-high temperaturemilk) enabled by the massive production of hotspots as a result of the self-assemblies that enhanced the SERS signal. This allowed the development of a microdroplet-LAMP-SERS platform with isothermal amplification and real-time identification capabilities.