In this study, a covalent organic framework (COF) was synthesized using 1,2,4,5-tetrakis-(4-formylphenyl)benzene (TFPB) and benzidine (BD) to mitigate the matrix effect in vegetable and fruit samples.