{"product_id":"detect-revenue-leakage-n8n-audit-sheets-gemini-gmail","title":"Detect Revenue Leakage: n8n Audit Sheets, Gemini \u0026 Gmail","description":"\u003ch3\u003eStop Revenue Leakage with Automated n8n Audits (Sheets + Gemini + Gmail)\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow audits your invoices, delivered work, payments, and follow-ups in Google Sheets to detect revenue leakage—then generates recovery next-steps with Google Gemini and sends customer emails via Gmail or posts internal alerts to Slack.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns on a schedule\u003c\/strong\u003e and loads configuration values like your Google Sheets spreadsheet ID and aging thresholds.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReads Google Sheets tabs\u003c\/strong\u003e: \u003cem\u003eInvoices\u003c\/em\u003e, \u003cem\u003eWork Delivered\u003c\/em\u003e, \u003cem\u003ePayments\u003c\/em\u003e, and \u003cem\u003eFollow-ups\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCorrelates records\u003c\/strong\u003e to spot issues such as unbilled work, duplicate billing, billing variance, draft invoices not sent, balance mismatches, orphan payments, and overdue\/due-soon invoices with insufficient follow-up.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCreates prioritized recovery tasks\u003c\/strong\u003e (with next-action dates) and appends them to the \u003cem\u003eFollow-ups\u003c\/em\u003e sheet, limited to the \u003cstrong\u003efirst two findings per run\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDrafts messages with Google Gemini\u003c\/strong\u003e: for each finding, it builds a prompt and generates a \u003cstrong\u003eJSON draft\u003c\/strong\u003e containing subject, body, and a recommended action.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNotifies via Gmail or Slack\u003c\/strong\u003e: if the finding is customer-facing and an email address exists, it emails the customer using Gmail; otherwise it posts an internal alert to the selected Slack channel.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProduces an audit summary\u003c\/strong\u003e including total findings processed and total amount at risk.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCatch \u003cstrong\u003eunbilled delivered work\u003c\/strong\u003e before it turns into lost cash.\u003c\/li\u003e\n  \u003cli\u003eIdentify \u003cstrong\u003eorphan payments\u003c\/strong\u003e or \u003cstrong\u003ebalance mismatches\u003c\/strong\u003e and launch recovery outreach.\u003c\/li\u003e\n  \u003cli\u003eEnsure \u003cstrong\u003edraft invoices are actually sent\u003c\/strong\u003e and follow-ups happen on time.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\/inputs:\u003c\/strong\u003e Google Sheets (Invoices, Work Delivered, Payments, Follow-up)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLLM:\u003c\/strong\u003e Google Gemini (JSON message drafts: subject\/body\/recommended action)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMessaging:\u003c\/strong\u003e Gmail for customer emails; Slack for internal alerts\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWorkflow logic nodes:\u003c\/strong\u003e if, set, code, gmail, limit, slack\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eSetup requirement\u003c\/h3\u003e\n\u003cp\u003eCreate a Google Sheets file with tabs named exactly: \u003cstrong\u003eInvoices\u003c\/strong\u003e, \u003cstrong\u003eWork Delivered\u003c\/strong\u003e, \u003cstrong\u003ePayments\u003c\/strong\u003e, and \u003cstrong\u003eFollow-up\u003c\/strong\u003e.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46228896645299,"sku":"N8N-20958","price":10.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/OkgTFZHGZO2Tga-guKqZk_mdxXzIUb.png?v=1792055927","url":"https:\/\/buyflowscripts.com\/products\/detect-revenue-leakage-n8n-audit-sheets-gemini-gmail","provider":"N8N Commerce","version":"1.0","type":"link"}