The metadata cleanup workflow also includes optional steps for enriching each compound with additional information and links found in compound databases and other web services, including PubChem, ChEMBL, 9,10 UniChem, DrugBank, DrugCentral, the Drug Repurposing Hub (Broad Institute, drug information), LOTUS 20 on Wikidata, the Dictionary of Natural Products, the Natural Product Atlas, and chemical classification by NPClassifier 27 and ClassyFire . This search is based on unique identifiers related to the database or the first block of InChIKey (split InChIKey). The final table contains all input columns and new compound information, e.g., on a compound's use as a drug or its clinical phase and its potential biosynthetic origins. The whole workflow was implemented in Python 3.10, utilizing the prefect library for task orchestration (Supplementary Fig. ). In the event of a failing web service, the workflow can be applied iteratively to saved intermediate results. Upon a successful query, each service adds a data retrieval date, which can be used to flag data as stale and to rerun the corresponding service for compounds with outdated or missing metadata. Additional queries can be added or disabled easily thanks to pipeline's modular design. Required and optional metadata fields are described in the mzmine documentation (). Briefly, the final format is a tab-separated (.tsv) or comma-separated (.csv) metadata sheet, with each row describing a relationship of a compound being contained in a sample. All compounds contained in the same mix point to the same unique sample ID, which should be a substring of each measurement, for example, sample_a1_id_pos.mzML and sample_a1_id_neg.mzML containing the unique sample ID 'sample_a1_id'. This way the same metadata sheet can be used for different acquisition dates, methods, and instruments. The minimum required compound information for the subsequent automatic library generation is the neutral mass and a name. Structures such as SMILES, InChI, or at least the molecular formula are preferable and replace the neutral mass with its calculated value during the metadata cleanup.