Tryptamine is a biogenic amine that affects organoleptic quality through the generation of off-odours in foods. Herein, imine-based covalent organic frameworks (COFs) were synthesized via Schiff base reactions and postmodified with click chemistry to generate azide-functionalized COFs with tunable azide units on the walls. The combination of molecular imprinting with COFs enabled the specific recognition of the targets. The resulting optosensing system (azide-functionalized COFs@MIPs) was used as a sample-to-answer analyser for detecting tryptamine (detection time within 10 min). A linear relationship was observed for the fluorescence response to tryptamine concentrations in the range of 3–120 μg L−1, with a limit of detection of 1.74 μg L−1. The recoveries for spiked samples were satisfactory, with relative standard deviations <9.90%. The optosensing system is a potential tool for the quantitative detection of tryptamine in meat products because of its lower cost, shorter processing time, and simpler processing steps compared to conventional chromatographic techniques.