AI-powered invoice reminder & payment tracker for finance & accounting
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs on a schedule (cron 0 9 * * *) (plus 1 other trigger). Along the way it connects Postgres and OpenAI Chat Model.
How it runs
Trigger: On a schedule (cron 0 9 * * *) (plus 1 other trigger).
- Fetch Pending Invoices (Postgres): run a query
- Update Payment Status (Postgres): run a query
- Filter Overdue Invoices (If): checks a condition and branches into true / false
- Webhook Response (Respond to Webhook): sends the response back to the webhook caller
- Send Payment Confirmation (Send Email): sends an email over SMTP
- Calculate Reminder Logic (Code): runs custom JavaScript code
- Prepare AI Prompt (Edit Fields (Set)): sets 1 field: aiPrompt
- AI Agent: runs an AI agent, with model: Generate Email
- Format Email (Code): runs custom JavaScript code
- Send Email: sends an email over SMTP
…plus 5 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)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Postgres
n8n-nodes-base.postgres - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - Send Email
n8n-nodes-base.emailSend - Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent
From the author
Streamline invoice management with this automated n8n workflow. Triggered daily at 9 AM, it fetches pending invoices, filters overdue ones, uses AI to generate personalized reminders, and sends them to clients. It also tracks payments via webhooks, updates…