---
title: "Auto-Draft Customer Support Replies with n8n and AI"
description: "Learn how to build a human-in-the-loop n8n workflow that auto-drafts support replies using AI. No API key needed — AI credits are included on AgentRoost."
canonical: https://agentroost.app/en/blog/ai-support-reply-drafts-n8n
date: 2026-06-06T12:00:00Z
---

[Canonical URL](https://agentroost.app/en/blog/ai-support-reply-drafts-n8n)

Your support inbox has a pattern problem. A large share of tickets are variations of the same handful of questions. A human reads each one, finds the right help article, adapts the wording, and sends. Multiply that across hundreds of tickets per week and the cost — in time and in the slowness that frustrates customers — is real.

This guide shows how to build a **human-in-the-loop** n8n workflow that handles the pattern: pull the ticket, consult a knowledge base, draft a reply in your brand voice, and park it for one human click before anything reaches the customer. First-response time drops. Quality stays controlled.

---

## What you are building

```
Trigger (webhook / poll)
  → Fetch ticket details (HTTP Request)
  → Query knowledge base (HTTP Request or Vector Store)
  → AI Agent node — draft reply
  → Format message (Set node)
  → Notify approver (Slack / Email)
  → Wait for approval (Webhook callback)
  → IF "approved" → Send reply (platform node)
             → ELSE → Flag for manual handling
```

The approval gate is what separates this from a fully autonomous bot. A wrong draft costs you one click to discard, not an embarrassing email to a customer.

---

## Step 1 — Set up the trigger

Choose how tickets arrive:

- **Webhook node** — most platforms (Zendesk, Freshdesk, Intercom, Linear) can POST to a URL when a ticket is created. Add a Webhook node in your n8n editor, copy the generated `https://<your-id>.agentroost.app/webhook/...` URL, and paste it into your platform's webhook settings. Public HTTPS, no tunnels, no Ngrok required.
- **Schedule Trigger + HTTP Request poll** — if your platform lacks webhooks, poll on an interval (e.g., every 5 minutes) and follow with an HTTP Request node to list new tickets.

Reference ticket fields in later nodes using n8n's expression syntax, for example `{{ $json.ticket.description_text }}`.

---

## Step 2 — Fetch your knowledge base

The AI node writes better replies when it has source material, not just a vague prompt.

**Option A — REST lookup.** If your help center has an API (Zendesk Guide, Freshdesk Solutions, Notion), add an **HTTP Request** node and search for articles matching the ticket subject. Pass the top 2–3 article bodies into the next node.

**Option B — Vector Store retrieval.** n8n includes Vector Store nodes (Pinecone, Supabase, Qdrant, in-memory). Embed your documentation once, then run a semantic search at runtime using the ticket's description text. This handles tickets that do not keyword-match the article title.

---

## Step 3 — Draft the reply with an AI node

Add an **AI Agent** node (or a **Basic LLM Chain** for a simpler single-pass call). Connect the knowledge-base output as additional context.

**System prompt:**
```
You are a customer support specialist for [Your Company].
Your tone is friendly, clear, and concise. Never make up information.
If the knowledge base articles provided don't cover the customer's question,
say so and suggest they reply for further help.
Always end with: "Let us know if there's anything else we can help with!"
```

**User message template:**
```
Customer ticket:
{{ $json.ticket.description_text }}

Relevant help center articles:
{{ $('HTTP Request').item.json.results[0].body }}

Draft a reply email to this customer.
```

Set the model to whatever fits your quality/cost tradeoff — a faster model for high volume, a more capable one for complex queries. You can switch models from the node dropdown at any time. **No new API keys required** on AgentRoost — credits are already included in your plan.

---

## Step 4 — Notify a human for approval

Add a **Set** node to bundle the draft cleanly (ticket ID, customer email, subject, draft text), then connect a **Slack** node (or Email/Teams):

> **New ticket draft ready for approval**  
> Ticket #`{{ $json.ticket_id }}` from `{{ $json.customer }}`  
> **Subject:** `{{ $json.subject }}`  
> **Suggested reply:** `{{ $json.draft }}`  
> ✅ [Approve & Send] | ❌ [Discard]

The Approve/Discard buttons link to a second **Webhook** node — the callback URL. When someone clicks Approve, n8n receives `{ "action": "approve", "ticket_id": "12345" }` and the workflow continues.

---

## Step 5 — Gate on approval, then send

Add an **IF** node:

- **Condition:** `{{ $json.action }}` equals `approve`
- **True branch:** Send the reply using the platform's native node (Zendesk, Freshdesk, Gmail, or an HTTP Request to its API)
- **False branch:** Post a "flagged for manual handling" message to Slack and stop

---

## Tips and common pitfalls

- **Trim article bodies before sending to the LLM.** Help center articles can be long. Use a **Code** node to slice `article.body.slice(0, 2000)` per article — keeps token usage reasonable without losing the key content.
- **Add a fallback before the AI node.** If the knowledge base returns zero articles, route to a simpler prompt: acknowledge the ticket and tell the customer a specialist will reply within 24 hours. This avoids the AI hallucinating with no grounding.
- **Store approval tokens, not ticket IDs, in the callback URL.** Ticket IDs are guessable. Generate a short random token in a Code node, store it in n8n's static data, and validate it in the callback webhook before acting.
- **Test with a dummy Slack workspace first.** Wire Approve → log to a Google Sheet instead of actually sending. Spot-check drafts across a batch of real tickets, then flip the send node live.

---

## Running this on AgentRoost

You own a private n8n instance — your login, your workflows, your subdomain. Here is how to get it running:

1. Sign up at [agentroost.app](/en/agents/n8n) and pick the **n8n** framework.
2. Name your instance (e.g., `support-ops`) — your private editor opens at `https://support-ops.agentroost.app`.
3. Build the workflow above. When you add the AI Agent node, the credential panel already shows an active connection — AI credits are included, no API key to paste.
4. Copy your Webhook trigger URL (a real public HTTPS URL) and drop it into your helpdesk's webhook settings.
5. Activate the workflow. Done.

Pricing starts at **$19.99/month all-in** — server, AI credits, SSL, subdomain, everything bundled. No separate AI bill appearing mid-month. 14-day money-back guarantee, cancel from your dashboard anytime.

[Compare plans](/en/pricing) · [See the n8n option](/en/agents/n8n)

---

## What this workflow does not do (and why that is fine)

It does not auto-send without human review — deliberately. A draft that slips through with wrong information does more brand damage than the time you save. The approval gate keeps a person accountable for every customer-facing sentence. As you build confidence in the drafts over time, you can narrow the gate: auto-send only for specific ticket categories, or only when the AI's response matches a known template. But start gated. The workflow earns autonomy; it does not start with it.
