Brazilian electronic invoices (Nota Fiscal eletrônica, NFe) are digital documents that register the purchase and sale operations of goods and services. In this work, we developed and used data‐cleaning procedures, clustering methods, and outlier detection algorithms to investigate the presence of two main risk patterns in the electronic invoices data of public entities, such as states or municipalities: abnormal product quantities and anomalous prices paid with public funds. As a case study, we analyzed nearly 3.5 million electronic invoices containing more than 11 million items from purchases made by public entities of the Brazilian state of Mato Grosso (MT) in 2016–2019. The results indicate that the total value of invoice items categorized as high‐intensity price alerts amounted to more than R$ 560 million, i.e., approximately US$ 139 million at the rate of December 31, 2019. Several cases of high‐risk patterns are presented to illustrate these practical results.