Templates / Classify invoice reminder replies with Claude Haiku, Gmail and Google Sheets

Classify invoice reminder replies with Claude Haiku, Gmail and Google Sheets

Ready for 3.0

by Giacomo · 1 views · created 2026-10-12 · 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 16 nodes and runs on Gmail events. Along the way it connects Gmail, Anthropic Chat Model and Google Sheets.

How it runs

Trigger: On Gmail events.

  1. Your settings (Edit Fields (Set)): sets 2 fields: sheetUrl, maxReplyChars
  2. Clean reply (Code): runs custom JavaScript code
  3. Classify reply (Basic LLM Chain): sends a prompt to an LLM, with model: Claude Haiku 5.; output parser: Reply class format
  4. Pair reply with result (Merge): merges the data from its input branches
  5. Prepare log row (Edit Fields (Set)): sets 8 fields: Received, From, Subject…
  6. Log to sheet (Google Sheets): append
  7. Route by class (Switch): routes items into 5 branches
  8. Label: Payment made (Gmail): add labels
  9. Label: Promise to pay (Gmail): add labels
  10. Label: Dispute (Gmail): add labels

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

Services it uses

GmailAnthropic Chat ModelGoogle Sheets

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)

From the author

Quick overview This workflow monitors Gmail for replies to invoice reminders, uses Claude Haiku to classify each reply, logs the result to Google Sheets, and applies a matching Gmail label so you can quickly triage each one as payment made, promise to pay,…

Excerpt from Giacomo'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.