Skip to content
FlowHubFluxonLab
A
AI Automationfree

Detect early payment invoice opportunities with Groq and Google Sheets

by WeblineIndiaadapted from n8n official workflow galleryUpdated Aug 2026
RequiresAAI AgentCCodeGmailGmailGoogle SheetsGoogle SheetsGroq Chat ModelGroq Chat ModelHTTP RequestHTTP Request
Share Post Share
ScDaily Invoice Scan TriggerDaily Invoice S…HRFetch Invoice DataFetch Invoice D…CoCalculate Discount ROICalculate Disco…IfCheck Discount EligibilityCheck Discount …SePrepare Invoice DataPrepare Invoice…AgAI Payment Decision EngineAI Payment Deci…Groq AI ModelCoClean AI ResponseClean AI Respon…Save Eligible Invoice LogSave Eligible I…IfCheck High Priority OpportunityCheck High Prio…AgCombine High Priority InvoicesCombine High Pr…CoMark Expired InvoicesMark Expired In…Save Expired Invoice LogSave Expired In…CoCreate Summary EmailCreate Summary …Email Finance SummaryEmail Finance S…1234567891011121314
1/5
STEPS · 14
Runs on a schedule

Quick Overview This workflow runs daily to fetch invoice data from an HTTP endpoint, calculate early-payment savings and annualized ROI, and use Groq (Llama 3.3) to prioritize eligible discounts. It logs eligible and expired invoices to Google Sheets and emails a digest of HIGH-priority recommendations via Gmail. How it works Runs every day at 9:00 to start an invoice scan. Fetches invoice records from an external HTTP API endpoint. Calculates potential savings, days saved by paying early, annualized ROI, and whether each invoice is still eligible before the discount deadline. Routes eligible invoices to Groq (Llama 3.3) to return a JSON decision with a YES/NO recommendation, HIGH/MEDIUM/LOW priority, and a short reason, then normalizes the AI response. Appends eligible invoice evaluations (including ROI, savings, priority, recommendation, and reason) to a Google Sheets log. Filters for invoices marked YES and HIGH priority, aggregates them into a daily batch, and emails a plain-text digest to the finance team via Gmail. Marks ineligible invoices as expired with a skip reason and appends them to a separate Google Sheets audit log.

Tags

n8nreference-onlyagentgmailgoogle-sheetslm-chat-groq
Connects
AAI AgentCCodegmailGmailsheetsGoogle SheetsgroqchatmodelGroq Chat ModelWHTTP Request
CategoryAI Automation
Triggermanual
Complexitycomplex
Nodes15
AddedJul 14, 2026

Related workflows

See all AI Automation
ACgmailsheets
free

Route procurement helpdesk tickets from Gmail with Groq and Slack

Quick Overview This workflow monitors a Gmail inbox for procurement requests, uses Groq (Llama 3.1) to classify and route each ticket with SLA logic, escalates high-risk items to Slack, creates a ticket via HTTP, sends an auto-reply from Gmail, and logs the full record to Google Sheets. How it works Triggers every minute when a new email arrives in a Gmail inbox. Extracts the sender, subject, body, timestamps, and Gmail thread/message IDs, and generates a procurement ticket ID. Looks up the email thread ID in Google Sheets to identify whether the request already exists. Uses Groq (Llama 3.1) to classify the request (category, urgency, sentiment, risk, team) and applies routing rules to set SLA deadlines, queues, and escalation flags. If escalation is required, posts a detailed alert to a Slack channel and creates an escalated ticket via an HTTP request; otherwise, creates a standard ticket via an HTTP request. Generates a short agent-facing status summary with Groq, emails the customer an acknowledgement and suggested reply via Gmail, and appends the full ticket and AI outputs to Google Sheets. Setup Connect your Gmail OAuth2 credential for both the inbox trigger and the customer a

by WeblineIndia
BCgmailsheets
free

Find and verify business emails with ScraperCity, OpenAI, Google Sheets, and Gmail

Quick overview This workflow reads contacts from Google Sheets, finds and verifies their business emails via the ScraperCity Email Finder API, generates a short personalized icebreaker with OpenAI, appends the enriched leads to another Google Sheet, and emails a run summary via Gmail. How it works Starts manually to run an email enrichment job. Reads contacts (first name, last name, domain) from an input Google Sheets worksheet and aggregates them into a single payload. Submits the contacts to the ScraperCity Email Finder API, then waits and repeatedly checks the job status until it succeeds or fails/times out. When the job succeeds, downloads the result CSV from ScraperCity, parses it, normalizes key fields (name, domain, email, verification status, provider), and keeps only rows with an email. For each verified contact, prompts OpenAI to generate one short, company-referencing cold-email opening line in the configured language. Appends the enriched lead (including email, status, and icebreaker) to an output Google Sheets worksheet and sends a summary email via Gmail. Setup Create a ScraperCity account with Email Finder credits and add an HTTP Header Auth credential that sends you

by Dr. Firas
ACDgmail
free

AI: Summarize podcast episode and enhance using Wikipedia

The workflow automates the process of creating a summarized and enriched podcast digest, which is then sent via email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team