Email Triage & Auto-Response

AI reads every incoming email, classifies it (reply needed, auto-reply, newsletter, spam), and routes it. Auto-replies go out, important ones alert you on Slack, newsletters get labeled, spam gets trashed.

Ready
Gmail New unread email
Code Build prompt
Claude Classify email
Code Parse result
Switch Route
Auto reply
Slack alert
Label
Trash

You will need

  • Gmail accountConnected via n8n's Gmail OAuth credential
  • Anthropic API keyFor Claude classification. Get one at console.anthropic.com
  • Slack webhookFor notifications. Create at api.slack.com/messaging/webhooks

Environment variables

ANTHROPIC_API_KEY -- your Claude API key

SLACK_WEBHOOK_URL -- your Slack incoming webhook URL

Setup (5 minutes)

  1. Import the JSON file into n8n (menu → Import from File)
  2. Open the "New Email" node and connect your Gmail credential
  3. Open "Send Auto Reply" and connect the same Gmail credential
  4. Set your two environment variables in n8n settings
  5. Create a Gmail label called "Newsletter" (or change the label name in the workflow)
  6. Run a manual test, then activate

Meeting Scheduling & Follow-ups

When a new calendar event appears, Claude generates a pre-meeting brief (who's attending, what to prepare, questions to ask) and drafts a follow-up email with action item placeholders. Brief goes to Slack, follow-up saves as a Gmail draft.

Ready
GCalNew event
CodeBuild prompt
ClaudeGenerate brief
CodeParse
Slack brief
Gmail draft

You will need

  • Google CalendarConnected via n8n's Google Calendar OAuth credential
  • Gmail accountFor drafting follow-up emails
  • Anthropic API keyFor generating briefs and follow-ups
  • Slack webhookFor receiving pre-meeting briefs

Environment variables

ANTHROPIC_API_KEY -- your Claude API key

SLACK_WEBHOOK_URL -- your Slack incoming webhook URL

What makes this smart

  • Analyzes attendee email domains to infer who they are
  • Generates 3 specific questions to ask (not generic ones)
  • Follow-up includes [ACTION ITEM] placeholders you fill in after the meeting
  • Filters out resource calendars (conference rooms) from attendee lists
  • Handles meetings with no description or no attendees gracefully

Automated Chat & Text Responses

Webhook endpoint that receives messages from any chat widget or SMS service. Claude responds based on your business context. Low-confidence answers and sensitive topics (billing, complaints) auto-escalate to Slack.

Ready
WebhookPOST message
CodeBuild prompt
IfHas message?
ClaudeRespond
IfConfident?
Slack + reply
Auto reply

You will need

  • Anthropic API keyFor generating responses
  • Slack webhookFor escalation notifications

Environment variables

ANTHROPIC_API_KEY -- your Claude API key

SLACK_WEBHOOK_URL -- your Slack incoming webhook URL

BUSINESS_CONTEXT -- describe your business in one sentence (e.g., "Loomiq LLC, an AI automation consultancy that builds workflow systems for small teams")

What makes this smart

  • Accepts multiple input formats (message/sender, Body/From for Twilio, text/from)
  • Empty messages get caught early with a friendly reply, no wasted API calls
  • Claude never invents pricing or policies -- says "I don't know" and escalates
  • Confidence below 0.7 auto-escalates to Slack even if Claude thinks it's fine
  • Billing, complaints, and refund requests always go to a human
  • Returns JSON response so your chat widget can display the reply

How to connect

  1. Import and activate the workflow in n8n
  2. Copy the webhook URL from the "Incoming Message" node
  3. POST to it with: {"message": "...", "sender": "...", "channel": "web"}
  4. The response is JSON: {"reply": "...", "escalated": true/false, "category": "..."}

Document & Invoice Processing

Watches your inbox for emails with attachments. Claude classifies each document using the full context (sender domain, email body, subject, filename). Logs everything to a Google Sheet and alerts you on Slack when action is needed (pay, sign, review).

Ready
GmailHas attachment
CodeExtract files
IfValid file?
ClaudeClassify
Google Sheet
Slack alert

You will need

  • Gmail accountConnected via n8n's Gmail OAuth credential
  • Google SheetCreate a sheet with columns: Date, Filename, Type, Vendor, Amount, Due Date, Action, Urgency, Notes, Sender Email, Subject
  • Anthropic API keyFor document classification
  • Slack webhookFor action-needed notifications

Environment variables

ANTHROPIC_API_KEY -- your Claude API key

SLACK_WEBHOOK_URL -- your Slack incoming webhook URL

GOOGLE_SHEET_ID -- the ID from your Sheet URL (between /d/ and /edit)

What makes this smart

  • Uses full context (sender domain, email body, subject) not just filenames -- "scan001.pdf" from a law firm with "NDA" in the subject gets classified as a contract
  • Extracts dollar amounts and due dates from the email body when present
  • Filters out non-document files (.exe, empty filenames) automatically
  • Handles multiple attachments per email (each processed individually)
  • Classifies into 8 types: invoice, receipt, contract, proposal, report, statement, tax_form, other
  • Urgency-based Slack alerts (!! for high, ! for medium)

What is n8n?

n8n is an open-source workflow automation tool. Think Zapier, but you own it and there are no per-task fees. You connect triggers (like "new email arrives") to actions (like "classify with AI" and "send a Slack message") using a visual canvas. These templates are pre-built workflows you import and connect to your accounts.

Getting started

1

Choose how to run n8n

n8n Cloud (easiest) Hosted for you. Free trial, no install needed. Go to n8n.io and sign up.
Self-hosted (free) Run on your own machine or server. Full control, no usage limits.
2

Install (self-hosted only)

If you chose self-hosted, install with one command:

# Install n8n globally
npm install -g n8n

# Start it
n8n start

# Open http://localhost:5678 in your browser

Requires Node.js 18 or 20 (not 25). Check with node --version

3

Get your API keys

The templates use Claude for AI processing. You'll need:

  • Anthropic API keySign up at console.anthropic.com. Free credits to start.
  • Slack webhookGo to api.slack.com → Your Apps → Incoming Webhooks. Takes 2 minutes.
4

Set environment variables

In n8n, go to Settings → Environment Variables and add:

ANTHROPIC_API_KEY=sk-ant-...
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...

Or set them in your shell before starting n8n if self-hosted.

5

Import a template

Download a workflow JSON from the Templates tab, then in n8n: click the ... menu in the top right corner → Import from File → select the JSON. Connect your credentials to the Gmail/Calendar nodes, test, and activate.

Need something more custom?

These templates are starting points. If you need a system tailored to your specific workflow, let's talk.

Book a 30-minute call