This study aimed to explore the risk factors for gastrointestinal side effects (GISEs) in patients with type 2 diabetes mellitus (T2DM) during treatment with glucagon-like peptide-1 receptor agonists (GLP-1RAs) based on real-world data and to develop a prediction model for GLP-1RA-related GISEs. This evidence concerns the gene GLP1R and diabetes mellitus.