3′-O-β-Glucosyl purine-related nucleosides are actinobacterial natural products with intricate structures, in which the glucosyl attachment to a nucleoside scaffold is governed by a glycosyltransferase. However, the molecular logic and engineered application of the glycosyltransferase have nearly remained unexplored. Here, we report the discovery, characterization, and exploitation of the thermophilic glycosyltransferase ScaGT. We uncover that ScaGT and its homologue AvpGT indicate prominent promiscuity against both sugar donors and a variety of nucleosides. Remarkably, we have solved the ternary complex structure of AvpGT, unveiling that it employs an unpreceded "twin-tyrosine gate" mechanism for substrate recognition and promiscuity, and we have also realized directed biosynthesis of diversified purine nucleoside analogues with unexpectedly enhanced titer via introduction of the external scaGT or avpGT. Moreover, we reveal that 3′-O-β-glucosyl ribavirin exhibits significantly enhanced antiviral activities, thereof showing its promising application potentials. Finally, we have further achieved the gram-scale production of 3′-O-β-glucosyl ribavirin by both biocatalytic and fermentation-feeding strategies. These findings expand the biochemical repertoire regarding glycosyltransferase reactions and provide the basis for rapid mining and rational engineering of more related glycosyltransferases toward synthetic biology applications.