Classify invoice reminder replies with Claude Haiku, Gmail and Google Sheets
Quick overview
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 each one as payment made, promise to pay, dispute, question, unrelated, or needs review. 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, Unrelated or Needs review, with any promised payment date (one week ahead if the customer gives none) 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. Needs review is for replies a person should read: vague, mixed or sarcastic ones, or if the model fails (the error is logged). 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, 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. An n8n automation workflow template by Giacomo.
Community Metrics
Author
Giacomo
Platform
web
Pricing model
free
Categories
- Automation
- AI
Tags
- n8n
- workflow
- google-sheets
- gmail
- code
- basic-llm-chain
- anthropic-chat-model
- structured-output-parser
Capabilities
- 6 nodes
- 1 views