A direct headspace injection method is presented and optimized for the analysis of volatile organic compounds (VOCs) using dielectric barrier discharge ionization-mass spectrometry (DBDI-MS), incorporating an intermediate vial in which the sample headspace is injected. The setup is built of commonly available, cheap consumable parts and easily enables the incorporation of different gases for generating different ionization atmospheres. The method can be fully automated by using standard GC autosamplers, and its rapid analysis time is suitable for high-throughput applications. We show that this method is suitable for both profiling analysis of complex samples such as biofluids and quantitative measurements for real-time reaction monitoring. Our optimized method demonstrated improved reproducibility and sensitivity, with detection limits for compounds tested in the high nanomolar to the low micromolar range, depending on the compound. Key parameters for method optimization were identified such as sample vial volume, headspace-to-liquid ratio, incubation temperature, and equilibration time. These settings were systematically evaluated to maximize the signal intensity and improve repeatability between measurements. Two use cases are demonstrated: (i) quantitative measurement of ethanol production by a metal-organic framework from CO