A generalizable strategy for the synthesis of rare-earth metal–organic frameworks (RE-MOFs) with 12-connected RE 9 clusters and shp topology. Pyrazine functionalization to boost antenna effect, realizing a robust platform for tetracyclines detection.