CORTEXFLOW · FREE FOREVER

Automation

Invoice AR Chaser

↓ Download workflow JSON

Import in n8n: Workflows → ⋯ → Import from file, then add your credentials. Free download with a free account.

How it works

Your automated accounts-receivable assistant that runs every morning:

  1. STEP 1 — Daily trigger + list open invoices — a daily 8 AM schedule trigger fires, then Stripe lists all invoices with status open (unpaid). No coding needed — it’s a single Stripe node.
  2. STEP 2 — Days overdue + sync AR ledger — a Code node computes days_overdue for each invoice (skipping invoices not due yet) and flags whether today is reminder day 1, 7, or 14. The workflow reads your AR sheet, appends brand-new invoices with status UNPAID, and refreshes the days-overdue on existing rows.
  3. STEP 3 — Day 1/7/14 reminders — invoices exactly 1, 7, or 14 days overdue get a branded Gmail reminder: a friendly nudge (day 1) → a firm “payment overdue” email (day 7) → a final notice (day 14), each with the invoice number, amount, and pay link. The sheet flips to REMINDER_SENT_DAY_1, _DAY_7, or _DAY_14.
  4. STEP 4 — Escalation + summary — invoices 14+ days overdue with no reminder due today are escalated to your Slack channel (customer, amount, days overdue, pay link), the sheet flips to ESCALATED, all branches merge, and you get one Telegram summary: total outstanding, oldest overdue invoice, reminders sent, and escalations today.

Status flow in Sheets: UNPAID → REMINDER_SENT_DAY_1 / REMINDER_SENT_DAY_7 / REMINDER_SENT_DAY_14 → ESCALATED

Set up steps

You’ll need:

  • n8n (self-hosted or cloud)
  • A Stripe account — stripe.com → Developers → API keys (restricted key with Invoice read permissions is enough)
  • A Gmail OAuth2 credential — n8n Credentials → Gmail OAuth2
  • A Slack OAuth2 credential — n8n Credentials → Slack OAuth2
  • A Google Sheets OAuth2 credential — n8n Credentials → Google Sheets OAuth2
  • A Telegram bot — message @BotFather, send /newbot, copy the token; get your chat ID from @userinfobot

Steps:

  1. Import the workflow — in n8n, Workflows → Import from File → select invoice-ar-chaser.json.
  2. CONFIG — AR — open the Set node and fill in:
    • business_name — your business name (used in reminder email sign-offs)
    • sender_name — the name signing the reminders
    • reminder_days — which days-overdue trigger a reminder (default 1,7,14)
    • escalation_day — days overdue before Slack escalation (default 14)
    • owner_slack_channel — your Slack channel name for escalations (e.g. finance)
  3. AR sheet — create a Google Sheet with a tab named AR and headers: Invoice ID | Number | Customer | Email | Amount | Due Date | Days Overdue | Status. Select your Google Sheets credential in the four Sheets nodes (Read AR Ledger, Append New Invoices, Update Existing Invoices, and both Status update nodes).
  4. Connect Stripe — select your Stripe credential in the List Open Invoices node.
  5. Connect Gmail + Slack — select your Gmail credential in Gmail — Send Reminder and your Slack credential in Slack — Escalate to Owner.
  6. CONFIG — Notifications — paste your Telegram chat ID, select your Telegram credential in Telegram — Send AR Summary, and activate the workflow.

Customize it

  • Real-time instead of daily — swap the Schedule Trigger for a Stripe webhook (invoice.created / invoice.finalized) so the workflow reacts the moment an invoice is issued.
  • PAID sync — add a second Stripe webhook (invoice.paid) that flips the row’s Status to PAID in the same AR sheet, giving you a full invoice lifecycle.
  • Change the reminder cadence — edit reminder_days in the CONFIG — AR node (e.g. 1,3,7,14,30); the reminder-day logic in Compute Days Overdue maps directly off these values.
  • Tiered escalation — add another IF branch (e.g. 30+ days) that notifies a different Slack channel or emails you directly.
  • Friendly vs. firm copy — all three email templates live in the Build Reminder Email Code node; tweak tone, add your logo signature, or CC your accountant.

Workflow nodes

This workflow is built from 21 nodes. Here's what each one does:

#NodeTypeWhat it does
1 Daily 8AM AR Check Schedule Trigger Starts the workflow automatically on a schedule.
2 CONFIG — AR Set Holds editable configuration values — fill in your own settings here before activating.
3 List Open Invoices Stripe Works with Stripe payments, customers, and invoices.
4 Compute Days Overdue Code Runs custom JavaScript to transform, filter, or compute data between steps.
5 Read AR Ledger Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
6 Split New vs Existing Code Runs custom JavaScript to transform, filter, or compute data between steps.
7 IF — Is New Invoice? IF Splits the flow into branches based on a condition.
8 Append New Invoices Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
9 Update Existing Invoices Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
10 Merge — Ledger Sync Merge Combines the outputs of two or more branches back into one flow.
11 IF — Reminder Due Today? IF Splits the flow into branches based on a condition.
12 Build Reminder Email Code Runs custom JavaScript to transform, filter, or compute data between steps.
13 Gmail — Send Reminder Gmail Sends or reads email through your Gmail account.
14 Update Sheet — Status REMINDED Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
15 IF — Needs Escalation? IF Splits the flow into branches based on a condition.
16 Slack — Escalate to Owner Slack Posts messages or reads data in Slack.
17 Update Sheet — ESCALATED Google Sheets Reads from or writes to a Google Sheet — this workflow's log and state store.
18 Combine Branches Merge Combines the outputs of two or more branches back into one flow.
19 Build AR Summary Code Runs custom JavaScript to transform, filter, or compute data between steps.
20 CONFIG — Notifications Set Holds editable configuration values — fill in your own settings here before activating.
21 Telegram — Send AR Summary Telegram Sends you a Telegram message or alert.

Setup instructions

1. Add your credentials

In n8n go to Credentials → New, create each credential below, then open the named node and select it:

NodeCredential to add
List Open Invoices Stripe API
Read AR Ledger Google Sheets OAuth2
Append New Invoices Google Sheets OAuth2
Update Existing Invoices Google Sheets OAuth2
Gmail — Send Reminder Gmail OAuth2
Update Sheet — Status REMINDED Google Sheets OAuth2
Slack — Escalate to Owner Slack OAuth2
Update Sheet — ESCALATED Google Sheets OAuth2
Telegram — Send AR Summary Telegram Bot API

2. Fill in your config values

Open the config node listed below and replace each placeholder with your own value before activating the workflow:

NodeFieldWhat to paste
CONFIG — AR business_name PASTE_YOUR_BUSINESS_NAME
Your business name
CONFIG — AR sender_name PASTE_YOUR_SENDER_NAME
Your sender name
CONFIG — AR owner_slack_channel PASTE_YOUR_SLACK_CHANNEL
Your slack channel
CONFIG — Notifications telegram_chat_id PASTE_YOUR_TELEGRAM_CHAT_ID
Your telegram chat id

How this workflow starts

  • Schedule Trigger: Runs every hours.

Use cases

Unpaid invoices are an interest-free loan to your customers — and chasing them manually is nobody's favorite job. This template is your automated accounts-receivable assistant, running every morning: Daily 8AM AR Check fires, List Open Invoices pulls all unpaid invoices from Stripe, and Compute Days Overdue calculates how overdue each one is, skipping invoices not due yet and flagging whether today is reminder day 1, 7, or 14. The workflow syncs everything into your AR sheet — new invoices appended with status UNPAID, existing rows refreshed — then sends reminders: a friendly nudge on day 1, a firm "payment overdue" on day 7, a final notice on day 14, each with invoice number, amount, and pay link, flipping rows to REMINDER_SENT_DAY_1 / _DAY_7 / _DAY_14. Invoices 14+ days overdue escalate to your Slack channel, the sheet flips to ESCALATED, and Telegram — Send AR Summary gives you the morning brief: total outstanding, oldest overdue invoice, reminders sent, escalations today.

Freelancer or small agency with 20–40 open invoices

A designer or dev shop billing $5k–$50k a month usually has a handful of invoices quietly aging past 30 days. Fill in CONFIG — AR (business name, sender name, reminder days, escalation channel) once, and the morning run handles the rest: the day-1 nudge goes out in your name with your sign-off, day-7 firms up the tone, day-14 is the final notice — all from the templates in Build Reminder Email, which you can tune to your voice or add your logo signature to. You only ever see the exceptions: the Slack escalation for 14-day laggards and the Telegram summary. Practical tip: most late payers pay at day 1 or day 7 — the automation captures that money without the awkward "just bumping this" email you were avoiding.

SaaS company with manual or annual invoices

Stripe handles the subscriptions, but enterprise annuals and setup fees are manual invoices that age silently. This workflow watches exactly those: List Open Invoices reads Stripe's open invoices regardless of how they were created, and the AR sheet becomes the single aging report the finance lead checks over coffee. Set escalation_day to 14 (or lower for big tickets) so the owner gets a Slack message with customer, amount, days overdue, and pay link the moment an invoice crosses the line — that visibility alone shortens payment cycles. Variation: add a second Stripe webhook on invoice.paid that flips the row to PAID, and the AR tab becomes a full invoice lifecycle instead of just the chase list.

Digital agency where the owner chases and the team doesn't

The classic agency problem: the founder knows which clients owe money, everyone else doesn't, and reminders happen "when someone remembers." This workflow institutionalizes the chase: the day 1/7/14 cadence runs regardless of who's on holiday, the Slack — Escalate to Owner post makes delinquency visible to the whole team channel, and the Telegram summary quantifies it — total outstanding, oldest overdue, reminders sent. That shared visibility changes behavior: account managers start nudging clients before day 14 because they can see the escalation coming. Tip: change reminder_days in CONFIG — AR to match your terms — net-15 clients might need 1,7,10, while enterprise net-30 can stay at 1,7,14.

Contractor or trades business with progress billing

A contractor billing in milestones — deposit, rough-in, completion — has invoices tied to job stages, and late final payments eat the margin. The AR sheet's columns (Invoice ID, Number, Customer, Email, Amount, Due Date, Days Overdue, Status) double as the job-billing tracker: filter by customer to see every milestone's state. The friendly→firm→final email progression suits trade relationships where you still want the next job from the same client — the day-1 nudge is polite enough to send to anyone. Practical variation: add a tiered escalation — a second IF branch at 30+ days that emails you directly or pings a different channel — so ancient invoices get personal attention instead of sitting at ESCALATED forever.

Bookkeeper managing AR for multiple clients

A bookkeeper running AR for five small businesses can duplicate this workflow per client: each gets its own CONFIG — AR (business name, sender name, escalation channel) and its own AR tab, all running off one n8n instance. The Telegram summaries arrive per client each morning — a 30-second scan tells the bookkeeper which clients need a human touch today. Because the reminder copy lives in the Build Reminder Email Code node, the bookkeeper can match each client's voice (formal for the law firm, friendly for the café) and CC the client's accountant on the day-14 notice. Tip: the workflow skips invoices not yet due, so early-paying clients never get a reminder by mistake — the most important trust property of any automated chase.

← All templates