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

Go to Workflow
0 views
Built by Giacomo Giacomo
Created on October 12, 2026

Description

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 paid, promised, disputed, or unrelated responses.

How it works
Watch for invoice replies picks up new replies (default search: "invoice" in the subject, not sent by you).
Clean reply strips quoted history and signatures.
An AI model sorts the reply into Payment made, Promise to pay, Dispute, Question or Unrelated, with any promised payment date and a one-line reason.
Each reply is logged to Google Sheets,including a direct link back to the Gmail thread, and labelled in Gmail. If the model fails, the reply is filed as Needs review with the error.

Setup
Credentials: connect Gmail, Google Sheets and your AI model (the Claude Haiku 5.5 node).
Gmail labels: create six labels in Gmail: Payment made, Promise to pay, Dispute, Question, Unrelated and Needs review. Open each Label node and pick the label with the same name.
Sheet: paste a blank Google Sheet's URL, copied from the address bar, into Your settings. The header row is written on the first run.
Update the Gmail search query to match how your invoice reminders are titled and filtered (for example, by subject keywords or sender).

Requirements
Gmail and Google Sheets connected via Google OAuth (self-hosted n8n needs a Google Cloud app: https://docs.n8n.io/integrations/builtin/credentials/google/)
An API key for Claude or another chat model

Customization
Another model: swap the Claude Haiku 5.5 node for any chat model node (OpenAI, Gemini, Mistral, Ollama).
Other classes: edit Classify reply, Reply class format and Route by class, then add a matching label.

Additional info
The workflow never sends email: a repThe workflow never sends email, so a tricky reply can at worst get a wrong label. It doesn't check your invoices either: Payment made means the customer says they paid.
ly written to trick the model can at worst get a wrong label.

This workflow was created by Giacomo and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (6)

Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic
Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Sheets
n8n-nodes-base.googleSheets
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured