See llms.txt for all machine-readable content.

Back to Templates

Triage sales outreach replies with Claude, Gmail, Slack and Data Tables

Quick overview

This workflow monitors Gmail outreach replies, uses Anthropic Claude to classify intent and draft safe responses, logs outcomes to n8n Data Tables, and posts hot leads, follow-ups, and review alerts to Slack.

How it works

  1. Triggers on new Gmail messages matching the search query (or runs a manual sample batch) and loads workflow settings.
  2. Normalizes each reply by stripping quoted history, extracting sender details, and flagging signals like opt-out language, bounces, or prompt-injection attempts.
  3. Checks the sender against a do-not-mail Data Table and skips already-processed Gmail message IDs using a reply ledger.
  4. Sends the cleaned reply to Anthropic Claude to label it (interested, question, not now, wrong person, unsubscribe, out of office, bounce, or spam/injection) and then enforces rules for confidence, opt-outs, and injection/bounce overrides.
  5. For safe, high-confidence replies that need a response, asks Anthropic Claude to draft a short email and blocks drafts that contain disallowed links, invented numbers, or placeholders.
  6. Upserts the lead's latest status, next step, and follow-up date into an n8n Data Table, then creates a Gmail draft in the original thread (drafts only, nothing is ever sent) and posts Slack alerts for hot leads or items needing human review.
  7. Runs every morning to find snoozed leads whose follow-up date is due, marks them as follow-up due in the ledger, and posts a single Slack summary.

Setup

  1. Add an Anthropic credential for both Claude steps and update the “approved facts” and other values (sender name, calendar link, confidence thresholds) in the Settings step.
  2. Add a Gmail credential, create/apply a Gmail label for outreach replies, and keep the trigger search query aligned to that label.
  3. Add a Slack credential and set the target channel (for example, #sales-replies) for hot lead, review, follow-up, and error notifications.
  4. Run the manual sample batch once to create the n8n Data Tables (reply_ledger and do_not_mail), then remove any sample rows if needed.
  5. Set this workflow as its own error workflow (or route errors to the included Slack alert) before activating it.

Requirements

  • n8n with Data Tables (self-hosted or Cloud), an Anthropic API key (Claude Haiku by default, about 0.01 USD per 34 replies in our tests), a Gmail account with OAuth2 access, and a Slack workspace with a bot that can post to your channel.

Customization

  • Settings holds the sender, calendar link, approved facts, the two confidence limits, the snooze days for "not now" and out of office, the reply length cap and the draft word limit. To add or rename a label, change both Claude prompts and the label list in Check label and confidence. The model is set in the two Claude nodes.

Additional info

Tested on 10 Nov 2026 on self-hosted n8n 2.44.5 with Claude Haiku, using 34 built-in made-up replies with a fixed answer key (8 labels, 3 prompt-injection attempts, 6 tricky cases). Results: 34 of 34 labelled correctly in 2 runs, all 3 injection attempts stopped, 13 of 13 drafts passed the checks, about 0.0097 USD per run. An editor run created both Data Tables and wrote the ledger, do-not-mail and referral rows. With a broken model id, every reply went to review and nothing was drafted. Not run by the author: real Gmail trigger and draft creation, Slack posts, and the morning sweep's Data Table nodes.