AutomationFlowsAI & RAG › Classify Cold Email Replies and Triage Gmail with Claude and Slack

Classify Cold Email Replies and Triage Gmail with Claude and Slack

ByKeith Uy @keithuy on n8n.io

This workflow monitors Gmail for new email replies, uses Anthropic Claude to classify each reply and draft a suggested response, then routes interested replies to Slack and a Gmail draft while labeling all other replies in Gmail for triage. Triggers every minute when a new email…

Event trigger★★★★☆ complexityAI-powered19 nodesGmail TriggerChain LlmAnthropic ChatOutput Parser StructuredSlackGmail
AI & RAG Trigger: Event Nodes: 19 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #16289 — we link there as the canonical source.

This workflow follows the Chainllm → Gmail recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "iSOe1xoQiNnyisNX",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Cold-Email Reply Classifier & Auto-Triage (Claude)",
  "tags": [],
  "nodes": [
    {
      "id": "cddbe6a7-9e12-483c-8dd6-1d30055bfad8",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -32
      ],
      "parameters": {
        "color": 4,
        "width": 580,
        "height": 652,
        "content": "## Cold-Email Reply Classifier & Auto-Triage (n8n + Claude)\n\n**Who it's for:** You run cold outbound and the replies pile up faster than you can deal with them.\n\n**What it does:** Claude reads every reply and drops it into one of six buckets (interested, not now, out of office, unsubscribe, referral, objection) with a confidence score. If someone's interested, you get a Slack ping plus a draft reply you can tweak and send. Everything else gets the matching Gmail label.\n\n**How it works:**\n1. The Gmail trigger picks up each new email.\n2. The Config node holds your offer context, Slack channel, and Gmail label IDs.\n3. Claude classifies the reply and writes a suggested response.\n4. A Switch sends interested replies to Slack and a Gmail draft. The rest get routed to the label node.\n\n**How to use:**\n- Connect Anthropic, Gmail and Slack (Select your account in each account)\n- Edit your offer context in the Config node.\n- Add your Slack channel and Gmail label IDs for each reply category.\n- Test one reply, then turn it on."
      },
      "typeVersion": 1
    },
    {
      "id": "92ba0cf3-af37-404a-88dd-31a9d82a8af1",
      "name": "Sticky Note - Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        -48
      ],
      "parameters": {
        "color": 5,
        "width": 252,
        "height": 428,
        "content": "### Setup\nConnect Gmail, Claude and Slack on the nodes below. In **Config**, add your offer context, Slack channel, and Gmail label IDs for not now, out of office, unsubscribe, referral, objection, and review."
      },
      "typeVersion": 1
    },
    {
      "id": "ed4b4fbf-68c9-4db1-b01d-299779c8ec33",
      "name": "Sticky Note - AI",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        -48
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 400,
        "content": "### 1. Classify with Claude\nReturns JSON with the category, a confidence score (0-100), a one-line summary, and a draft reply in your voice."
      },
      "typeVersion": 1
    },
    {
      "id": "bd6a8b3b-983b-4f4e-8e3d-ff5a19a9eb85",
      "name": "Sticky Note - Route",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        -48
      ],
      "parameters": {
        "color": 7,
        "width": 716,
        "height": 1496,
        "content": "### 2. Route and act\nSwitch branches route each category. Interested replies go to Slack and get a Gmail draft. Each non-interested category gets its matching Gmail label."
      },
      "typeVersion": 1
    },
    {
      "id": "80a4771c-bfe0-4cf7-8b27-3912c2ca508b",
      "name": "New Email Reply",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        432,
        224
      ],
      "parameters": {
        "simple": false,
        "filters": {},
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6846c424-a98e-4727-97ee-fe69e2d0be01",
      "name": "Config (edit me)",
      "type": "n8n-nodes-base.set",
      "position": [
        688,
        224
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "offer_context",
              "type": "string",
              "value": "We sell done-for-you cold-outbound lead-gen systems to US marketing agencies. Our tone is direct, helpful, and low-pressure. When drafting a reply to an interested prospect, propose a quick 15-minute call and offer two time windows. Never be pushy. Sign off as 'Keith'."
            },
            {
              "id": "a2",
              "name": "slack_channel",
              "type": "string",
              "value": "#cold-email-replies"
            },
            {
              "id": "not_now_label_id",
              "name": "not_now_label_id",
              "type": "string",
              "value": "REPLACE_WITH_NOT_NOW_LABEL_ID"
            },
            {
              "id": "out_of_office_label_id",
              "name": "out_of_office_label_id",
              "type": "string",
              "value": "REPLACE_WITH_OUT_OF_OFFICE_LABEL_ID"
            },
            {
              "id": "unsubscribe_label_id",
              "name": "unsubscribe_label_id",
              "type": "string",
              "value": "REPLACE_WITH_UNSUBSCRIBE_LABEL_ID"
            },
            {
              "id": "referral_label_id",
              "name": "referral_label_id",
              "type": "string",
              "value": "REPLACE_WITH_REFERRAL_LABEL_ID"
            },
            {
              "id": "objection_label_id",
              "name": "objection_label_id",
              "type": "string",
              "value": "REPLACE_WITH_OBJECTION_LABEL_ID"
            },
            {
              "id": "review_label_id",
              "name": "review_label_id",
              "type": "string",
              "value": "REPLACE_WITH_REVIEW_LABEL_ID"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ea73298d-8b62-4fe4-8901-f76417dd4493",
      "name": "Classify Reply + Draft Response",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1104,
        224
      ],
      "parameters": {
        "text": "=You triage replies to cold outreach emails.\n\nOFFER / VOICE CONTEXT:\n{{ $('Config (edit me)').item.json.offer_context }}\n\nINCOMING EMAIL:\nFrom: {{ $('New Email Reply').item.json.from }}\nSubject: {{ $('New Email Reply').item.json.subject }}\nBody:\n{{ $('New Email Reply').item.json.snippet }}\n\nTASK:\n1. Classify the reply into exactly one category: interested, not_now, out_of_office, unsubscribe, referral, objection.\n2. Give a confidence score 0-100.\n3. Write a one-line summary of the reply.\n4. Draft a short suggested reply in the voice described above. If the category is unsubscribe or out_of_office, set suggested_reply to an empty string.",
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.4
    },
    {
      "id": "1447dbe9-11d1-47f7-b478-e03b9602b433",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        976,
        560
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-6",
          "cachedResultName": "Claude Sonnet 4.6"
        },
        "options": {
          "temperature": 0.3
        }
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "04935a5a-3475-4cd7-9360-307322e574e1",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1248,
        400
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"category\": \"interested\",\n  \"confidence\": 88,\n  \"summary\": \"Wants to see pricing and a quick call next week.\",\n  \"suggested_reply\": \"Happy to walk you through it. Would Tue 10am or Wed 2pm work for a quick 15 min?\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "4259ec7c-c55c-4fb7-9eb8-32b9d9b0b6ca",
      "name": "Route by Category",
      "type": "n8n-nodes-base.switch",
      "position": [
        1552,
        144
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Interested",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.category }}",
                    "rightValue": "interested"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Not now",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.category }}",
                    "rightValue": "not_now"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Out of office",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.category }}",
                    "rightValue": "out_of_office"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Unsubscribe",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.category }}",
                    "rightValue": "unsubscribe"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Referral",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.category }}",
                    "rightValue": "referral"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Objection",
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": false,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.category }}",
                    "rightValue": "objection"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra",
          "renameFallbackOutput": "Review"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "33bd018b-2e61-413d-b2eb-3ebb786ddb80",
      "name": "Notify Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1792,
        128
      ],
      "parameters": {
        "text": "=:fire: *Interested reply* ({{ $json.output.confidence }}% conf)\nFrom: {{ $('New Email Reply').item.json.from }}\nSummary: {{ $json.output.summary }}\n\nDraft reply prepared in Gmail.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "={{ $('Config (edit me)').item.json.slack_channel }}"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "05af5d58-90d3-4380-b95b-8f280b3e734e",
      "name": "Create Gmail Draft",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2016,
        128
      ],
      "parameters": {
        "message": "={{ $json.output.suggested_reply }}",
        "options": {
          "sendTo": "={{ $('New Email Reply').item.json.from }}",
          "threadId": "={{ $('New Email Reply').item.json.threadId }}"
        },
        "subject": "=Re: {{ $('New Email Reply').item.json.subject }}",
        "resource": "draft"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7acdb91d-c75c-48dd-96a2-e6a91409030c",
      "name": "Label Not Now",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1792,
        320
      ],
      "parameters": {
        "labelIds": [
          "={{ $('Config (edit me)').item.json.not_now_label_id }}"
        ],
        "messageId": "={{ $('New Email Reply').item.json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "2f59feef-110c-4e5d-b20f-ed9fe6c09642",
      "name": "Label Out Of Office",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1792,
        512
      ],
      "parameters": {
        "labelIds": [
          "={{ $('Config (edit me)').item.json.out_of_office_label_id }}"
        ],
        "messageId": "={{ $('New Email Reply').item.json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b066c3a2-f089-4dbf-93cc-5029526ec0d6",
      "name": "Label Unsubscribe",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1792,
        704
      ],
      "parameters": {
        "labelIds": [
          "={{ $('Config (edit me)').item.json.unsubscribe_label_id }}"
        ],
        "messageId": "={{ $('New Email Reply').item.json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "cf5a7015-a9ae-480e-8c6f-2c53c2f3a91a",
      "name": "Label Referral",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1792,
        896
      ],
      "parameters": {
        "labelIds": [
          "={{ $('Config (edit me)').item.json.referral_label_id }}"
        ],
        "messageId": "={{ $('New Email Reply').item.json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "abbaf29c-5772-4bde-99e8-c2ba2c40d43a",
      "name": "Label Objection",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1792,
        1088
      ],
      "parameters": {
        "labelIds": [
          "={{ $('Config (edit me)').item.json.objection_label_id }}"
        ],
        "messageId": "={{ $('New Email Reply').item.json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ce9c3518-d1c9-4212-b67c-290cbdc8d40f",
      "name": "Label Review",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1792,
        1280
      ],
      "parameters": {
        "labelIds": [
          "={{ $('Config (edit me)').item.json.review_label_id }}"
        ],
        "messageId": "={{ $('New Email Reply').item.json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "18fd6a1b-2994-41a3-97b0-23a0f766cd92",
      "name": "Sticky Note - Setup1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        400
      ],
      "parameters": {
        "color": 5,
        "width": 204,
        "height": 300,
        "content": "### Model Selection\nFeel free to change to a model of your choosing"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "b8f0941d-3b55-47c8-b497-42fa0515c873",
  "nodeGroups": [],
  "connections": {
    "Notify Slack": {
      "main": [
        [
          {
            "node": "Create Gmail Draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Email Reply": {
      "main": [
        [
          {
            "node": "Config (edit me)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config (edit me)": {
      "main": [
        [
          {
            "node": "Classify Reply + Draft Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Category": {
      "main": [
        [
          {
            "node": "Notify Slack",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Label Not Now",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Label Out Of Office",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Label Unsubscribe",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Label Referral",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Label Objection",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Label Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Classify Reply + Draft Response",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Classify Reply + Draft Response",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Classify Reply + Draft Response": {
      "main": [
        [
          {
            "node": "Route by Category",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow monitors Gmail for new email replies, uses Anthropic Claude to classify each reply and draft a suggested response, then routes interested replies to Slack and a Gmail draft while labeling all other replies in Gmail for triage. Triggers every minute when a new email…

Source: https://n8n.io/workflows/16289/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

[](https://youtu.be/nC2mSry3xFo)

Gmail Trigger, OpenAI Chat, Output Parser Structured +6
AI & RAG

This workflow turns your website form into a fully automated AI Lead Qualification system. Whenever a new lead submits your form, the workflow: Receives the submission through a Webhook Cleans and nor

Form Trigger, Agent, OpenAI Chat +7
AI & RAG

Your inbox shouldn't run your day. This workflow checks Gmail every 15 minutes, uses Claude AI to classify every new email into Urgent, Needs Reply, FYI Only, Automated, or Spam — then takes the right

Gmail Trigger, Chain Llm, Anthropic Chat +3
AI & RAG

This workflow monitors a Gmail inbox for unread support emails, uses Anthropic Claude to classify and draft replies, routes urgent tickets to Slack and a Gmail draft, auto-replies to normal tickets, a

Gmail Trigger, Chain Llm, Anthropic Chat +3
AI & RAG

Stop spending 20 minutes writing each Upwork proposal from scratch. This workflow reads your Vollna job alert emails, scores every job against your skills and budget preferences, and uses Claude to wr

Gmail Trigger, Chain Llm, Anthropic Chat +3