Set up the AI Customer Support Agent

About 15 minutes on n8n Cloud (longer on self-hosted n8n, where you first create your own Google OAuth client). Everything you need to go from download to the first drafts, in order. Ticks are saved in this browser so you can come back later.

Before you start

  • n8n (Cloud or self-hosted)
  • Google account: Gmail + Sheets
  • OpenAI API key
  • A knowledge base: one row per question and answer

1. Pick where it runs

n8n Cloud
  1. Log in to your n8n Cloud workspace.
  2. Workflows → Import from file.
  3. Pick the file(s) in workflow/.
n8n self-hosted
  1. Open your n8n (Docker or npm, v1.x/2.x).
  2. Workflows → Import from file.
  3. Same files; nothing else changes.
ChatGPT or Claude
  1. Create a Custom GPT or Claude Project.
  2. Paste gpt/INSTRUCTIONS.txt.
  3. Upload your sheet or paste rows in.

2. Setup checklist

3. Connect your tools

ServiceNodes that use it
Google SheetsGet Knowledge Base, Log Ticket
OpenAIClassify & Draft
GmailGet Support Emails, Create Reply Draft, Label Processed

In each node, choose Create new credential and sign in (Google uses OAuth; OpenAI takes an API key). n8n stores credentials in your instance, not with us.

What the statuses mean

StatusMeaningYour next step
draftedReply draft is in the threadReview, edit, send
needs_humanEscalated (see escalation_reason)Answer yourself; add the answer to the KB so it's covered next time
errorSee the error columnFix, then remove the plugstaff-processed label from the email so the next run picks it up

Troubleshooting

SymptomFix
Everything is escalatedKB too thin or threshold too high → add Q&A rows, lower `confidence_threshold` to 0.65 and compare
Replies include quoted historySome clients quote differently → the cleaner strips `>` lines; paste a sample in support and we'll extend it

Guardrails

  • Drafts only: a human sends every reply. Keep it that way until you trust the answers on your own data.
  • Customer emails are sent to your LLM provider. Mention AI-assisted processing in your privacy policy, and don't put secrets in the KB.
  • If you serve EU users and later let it send automatically, tell customers they're talking to an AI (EU AI Act transparency duties for AI that interacts with people). Not legal advice.