Classify invoice reminder replies with Claude Haiku, Gmail and Google Sheets
Ready for 3.0What 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.
- Your settings (Edit Fields (Set)): sets 2 fields: sheetUrl, maxReplyChars
- Clean reply (Code): runs custom JavaScript code
- Classify reply (Basic LLM Chain): sends a prompt to an LLM, with model: Claude Haiku 5.; output parser: Reply class format
- Pair reply with result (Merge): merges the data from its input branches
- Prepare log row (Edit Fields (Set)): sets 8 fields: Received, From, Subject…
- Log to sheet (Google Sheets): append
- Route by class (Switch): routes items into 5 branches
- Label: Payment made (Gmail): add labels
- Label: Promise to pay (Gmail): add labels
- Label: Dispute (Gmail): add labels
…plus 3 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)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Sheets
n8n-nodes-base.googleSheets - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Merge
n8n-nodes-base.merge
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,…