Customer supportIntermediateFor humans and agentsDocumentedRuns on n8n

Triage a support inbox with an agent

An n8n workflow reads each new support email, tags it, and saves a draft reply. A person reviews and sends every reply.

7 stepsAbout 60 min to set upLast updated Oct 31, 202610 named sources
Open as Markdown
Warning.
  • Privacy.
  • Each support email, including the customer's name, address and message, is sent to Anthropic's API to tag it and draft a reply.
  • Check that your privacy notice and customer terms allow this.
  • Keep attachments out of the prompt.

You will need

  • A Gmail inbox used for support (Google Workspace or personal)
  • n8n: n8n Cloud (paid after a free trial) or the free self-hosted Community edition
  • An Anthropic API key for Claude (usage is billed per token), or n8n Cloud AI credits
  • A one-page list of your ticket types, urgency rules and links to your help docs

You will end up with

  • Every new email labelled with a ticket type and urgency in Gmail
  • A draft reply saved in Gmail for each ticket, never sent automatically
  • A short weekly list of rules to improve, based on the drafts you rewrote
  1. Set up n8n and connect Gmail

    Use n8n Cloud or self-host the free Community edition. Add a Google credential for Gmail. Gmail has no draft-only permission: the scope that lets an app create drafts also lets it send mail. So the protection here is the workflow itself: never add a Gmail 'Send' or 'Reply' step.

    Sources: n8n pricing · n8n docs: Host n8n · Google: Gmail API scopes · n8n docs: Gmail node

  2. Trigger on new email

    Add a Gmail Trigger node. It checks for new messages at the poll time you set (for example every 15 minutes). Start by filtering to one label or a test address so you only handle a small batch at first.

    Sources: n8n docs: Gmail Trigger node

  3. Write your tags and rules on one page

    List the ticket types you see most (for example billing, bug, how-to, refund) and what counts as urgent. Keep it to one page. This becomes the classifier's categories and the drafting prompt.

  4. Classify each email

    Add a Text Classifier node with your categories, connected to an Anthropic Chat Model node (Claude). Add a final category, needs-human, for anything the model is unsure about.

    Sources: n8n docs: Text Classifier node · n8n docs: Anthropic Chat Model node

  5. Label the email and save a draft reply

    Use the Gmail node's 'Add Label to a message' operation for the type and urgency. Then ask the model for a reply and save it with the Gmail node's 'Create a draft' operation. A Gmail draft is an unsent message.

    Sources: n8n docs: Gmail node (operations) · Google: Working with drafts (Gmail API)

    Prompt
    You draft replies for the support inbox of [COMPANY].
    Ticket type: {{type}}. Urgent: {{urgent}}.
    Use only facts from these help docs: [LINKS].
    Write in our voice: [2-3 lines on tone].
    If the docs do not answer the question, write one line saying a teammate will follow up and add the note NEEDS-HUMAN at the top.
    Never promise refunds, dates or fixes.
  6. A person reviews and sends every draft

    Open Gmail, read each draft, edit it and send it yourself. Do not add a send step to the workflow until the drafts have needed almost no edits for several weeks, and even then keep refunds and angry customers with a person. If you later move to an AI Agent node with a send tool, n8n can require human approval before that tool runs.

    Sources: n8n docs: Human-in-the-loop for tools

    Human checkpoint. A person approves this step before the agent goes further.
  7. Improve the rules each week

    Look at the drafts you rewrote the most. Add one line to your rules or prompt for each pattern. Watch for emails that try to instruct the agent (prompt injection): treat email text as data, never as instructions.

    Sources: Anthropic: Mitigating prompt injections in browser use