Draft Gmail replies with Claude Sonnet and log decisions in Google Sheets

Go to Workflow
0 views
Built by Nour Charaf Eddin Nour Charaf Eddin
Created on August 12, 2026

Description

Quick overview
This workflow monitors unread Gmail inbox messages, uses Anthropic Claude to decide whether a reply is needed and draft a response in your business voice, creates a Gmail draft in the original thread, and logs the email details and AI decision (category, urgency, escalation) to Google Sheets.

How it works
Triggers every minute when a new unread email arrives in Gmail Inbox (excluding Promotions and Social categories).
Normalizes the incoming email into consistent fields like sender name/address, subject, body, message ID, and thread ID.
Sends the email plus your business profile (tone, facts, signature, and example replies) to Anthropic Claude to classify the email and generate a JSON reply draft when appropriate.
Parses and sanitizes Claude’s JSON output, defaulting to “no reply” with an escalation flag if the response cannot be parsed.
Creates a Gmail draft reply in the original thread when Claude indicates a reply is needed.
Appends a row to a Google Sheets “Email Log” sheet with the timestamp, sender, subject, category, urgency, escalation flag, reason, and whether a draft was created.

Setup
Connect your Gmail account in both the Gmail trigger and Gmail draft actions.
Add your Anthropic credentials and select the Claude Sonnet model in the Anthropic chat model node.
Connect Google Sheets, select the target spreadsheet, and ensure it has a worksheet named “Email Log” with columns: timestamp, from, subject, category, urgency, draft_created, escalate, reason.
Update the business profile values (business name, tone, key facts, signature, and example replies) so Claude drafts match your voice and allowed facts.
Optionally adjust the Gmail search query in the trigger to match the inbox labels and filtering you want.

Requirements
A Gmail account
An Anthropic API key
A Google Sheets spreadsheet with a tab named Email Log

Customization
Edit the business profile node with your business name, tone, key facts, signature and 2 or 3 example replies so drafts sound like you
Tighten the Gmail search filter in the trigger to control which emails get processed
Add a Slack or email alert for emails flagged as escalate

Additional info
Nothing is ever sent automatically. The workflow only creates drafts, a human always reviews and sends. Anything the AI cannot verify from your business facts is marked with a [CHECK] placeholder in the draft so the reviewer fills it in before sending. Tested end to end on a live inbox, including correct skipping of newsletters and cold outreach.

Nodes Used (5)

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