This study explored the in-situ growth of zeolitic imidazolate framework-8 on woven cotton yarn for the first time. The applicability of highly flexible and natural cotton yarn-polypyrrole-layered double hydroxide-zeolitic imidazolate framework-8 composite (CY- PPy-LDH-ZIF8) was introduced for the extraction of quercetin in plasma and food samples. For increasing the contact area of the analyte and the prepared sorbent, the green substrate was woven and employed as the substrate for the construction of ZIF8. Extraction, separation, and determination of the analyte were performed by TFME-HPLC-UV. Due to the large surface area, the number of cages and unique porous structure of the zeolitic imidazolate framework-8 (ZIF8) as well as hydrogen bonding, ionic and p-p interactions between the analyte and the ZIF8, the prepared thin film showed a high affinity towards the target analyte. The affecting parameters on the extraction efficiency, including pH of the sample solution, extraction time, stirring rate, desorption time, and elution solvent volume were investigated and optimized through applying Box-Behnken Design (BBD). Under optimum conditions, calibration curves were found to be linear in the range of 0.2e200 mg L1 with r2 > 0.9958. The limits of detection (based on S/N ¼ 3), limits of quantification (based on S/N ¼ 10), and intra-day, as well as inter-day RSDs, were lower than 0.21 mg L1, 0.70 mg L1 and 5.6%, respectively.