Chase overdue invoices and match bank payments with Gmail, Sheets, and OpenAI
Ready for 3.0What this workflow does
This AI workflow has 48 nodes and runs on a schedule (cron 0 9 * * 1-5) (plus 3 other triggers). Along the way it connects Google Sheets, Gmail and OpenAI Chat Model.
How it runs
Trigger: On a schedule (cron 0 9 * * 1-5) (plus 3 other triggers).
- Set Collection Policy (Edit Fields (Set)): sets 14 fields: sheet_id, ar_clerk_email, finance_email…
- Set Matching Rules (Edit Fields (Set)): sets 8 fields: sheet_id, ar_clerk_email, fee_tolerance_abs…
- Set Reply Rules (Edit Fields (Set)): sets 5 fields: sheet_id, ar_clerk_email, account_manager_email…
- Alert on Workflow Failure (Gmail): uses Gmail
- Read Customers from Sheets (Google Sheets): uses Google Sheets
- Read Bank Payments from Sheets (Google Sheets): uses Google Sheets
- Extract Reply Intent (Information Extractor): extracts structured fields from text with AI, with model: OpenAI GPT-4 Mini
- Aggregate: combines items into one
- Aggregate: combines items into one
- Read What the Reply Says (Code): runs custom JavaScript code
…plus 31 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (When a Reply Arrives).
Nodes used (14)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - Aggregate
n8n-nodes-base.aggregate - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - Gmail Trigger
n8n-nodes-base.gmailTrigger - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Error Trigger
n8n-nodes-base.errorTrigger
From the author
Quick Overview This workflow uses Google Sheets as an AR ledger, matches bank payments to open invoices each weekday morning, then emails consolidated overdue statements via Gmail and escalates edge cases; it also uses OpenAI to classify incoming reply intent…