Templates / Follow up on overdue invoices with OpenAI, Gmail and Google Sheets

Follow up on overdue invoices with OpenAI, Gmail and Google Sheets

Ready for 3.0

by Sean Jastillano · 7 views · created 2026-09-05 · Invoice Processing, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 22 nodes and runs on a schedule (cron 0 9 * * *). Along the way it connects Google Sheets, Gmail and OpenAI.

How it runs

Trigger: On a schedule (cron 0 9 * * *).

  1. Initialize Configurations (Code): runs custom JavaScript code
  2. Read from Invoice Sheets (Google Sheets): uses Google Sheets
  3. Identify Eligibility Stage (Code): runs custom JavaScript code
  4. Loop Through Invoices (Loop Over Items (Split in Batches)): loops over the items in batches
  5. Retrieve Gmail History (Gmail): get many
  6. Construct Email Context (Code): runs custom JavaScript code
  7. Check Stage Sent Already (If): checks a condition and branches into true / false
  8. Reconcile Sent Invoices (Code): runs custom JavaScript code
  9. Check Recent Conversation (If): checks a condition and branches into true / false
  10. Update Invoice in Sheets (Google Sheets): update

…plus 10 more steps. See the full node list below.

Services it uses

Google SheetsGmailOpenAI

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 (8)

From the author

Quick overview This workflow runs daily and reads an invoices Google Sheet, checks recent Gmail threads for each overdue invoice, and uses OpenAI to classify correspondence before sending a stage-based follow-up email via Gmail or deferring/flagging for human…

Excerpt from Sean Jastillano's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.