Predict and route late payment reminders with Google Sheets, OpenAI, Gmail and Slack
Ready for 3.0What this workflow does
This AI workflow has 35 nodes and runs on a schedule (cron 0 9 * * 1-5). Along the way it connects Google Sheets, Gmail, OpenAI and Slack.
How it runs
Trigger: On a schedule (cron 0 9 * * 1-5).
- Set Dunning Rules (Edit Fields (Set)): sets 25 fields: companyName, paymentLink, financeReplyTo…
- Read Open Invoices (Google Sheets): uses Google Sheets
- Read Payment History (Google Sheets): uses Google Sheets
- Read Client Responses (Google Sheets): uses Google Sheets
- Search Client Replies (Gmail): get many
- Build Client Profiles & Match Replies (Code): runs custom JavaScript code
- Has New Reply? (Filter): keeps only the items that match a condition
- Decide Next Action (Code): runs custom JavaScript code
- Classify Client Reply (OpenAI): uses OpenAI
- Collect Broken Promises (Code): runs custom JavaScript code
…plus 24 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.
Nodes used (10)
- Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail - Code
n8n-nodes-base.code - Filter
n8n-nodes-base.filter - OpenAI
@n8n/n8n-nodes-langchain.openAi - Switch
n8n-nodes-base.switch - Slack
n8n-nodes-base.slack - If
n8n-nodes-base.if - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set
From the author
Quick overview This workflow runs every weekday morning to read invoices and payment history from Google Sheets, score each open invoice for late-payment risk, and use OpenAI plus Gmail to send friendly or firm reminders, or create a call task with a Slack…