Skip to content
Premium flowCustomer SupportAdvanced setupAbout 50 min to set upMessages in English · Arabic

AI Customer Support

Every customer message is classified by OpenAI and routed: sales to your Leads sheet, problems to a support ticket, FAQ questions get your own answer by email. Anything uncertain goes to a person on Telegram.

What can you use this flow for?

  • Route website/chat enquiries into sales leads, FAQ replies or support tickets.
  • Escalate uncertain AI classifications to a human team rather than inventing answers.

What you need before starting

  • An n8n endpoint fed from a trusted server-side webhook and Google Sheets for Messages, Leads, Tickets and FAQ.
  • OpenAI API key with separate API billing, Google service account, SMTP and Telegram bot.

How to set it up

  1. Request the licensed premium package and import it to n8n.
  2. Connect Header Auth, OpenAI API, Sheets, SMTP and Telegram credentials.
  3. Prepare the FAQ and other spreadsheet tabs; set business details, chats and minConfidence.
  4. Send test sales, support and FAQ messages and check routing, your authored FAQ answers, and escalation behavior.

The AI classifies requests; FAQ replies use your approved text only. Do not put the webhook token into browser code.

The package includes detailed installation, configuration and troubleshooting guides.

Works with

  • Email
  • Google Sheets
  • OpenAI
  • Telegram
  • Webhook

Requirements

  • Webhook token (Header Auth)
  • Google service account (JSON key)
  • OpenAI API key
  • SMTP account of your mail provider, for customer emails
  • Telegram bot

You connect your own accounts inside your n8n. Jervis never sees or stores your credentials.

Settings you'll fill in

Support spreadsheet
The spreadsheet's URL or id. Share it with the service account email as Editor.
Messages tab
Every message and what happened to it. It is also how the flow recognises a message it has already received.
FAQ tab
Your questions and answers (faqId, question, answer_en, answer_ar). Only these answers are ever sent to customers.
Leads tab
Sales inquiries are added here, one row each.
Tickets tab
Support requests become a ticket here, one row each.
Business name
Shown in the emails to customers (up to 100 characters).
About your business (optional)
One or two sentences that help the AI tell sales from support. Up to 1000 characters.
Sender address
support@your-company.com or "Your Company <support@your-company.com>". Your SMTP provider must allow it.
Reply-to address (optional)
Where customer replies go. Empty: to the sender address.
Acknowledge by email (optional)
yes: customers with an email address get a short "we received your message" email with their reference when a person will answer. no: only FAQ answers are emailed.
OpenAI model (optional)
A model that supports Structured Outputs. Default gpt-5-mini: fast and inexpensive.
Minimum confidence (optional)
From 0.5 to 0.99. Messages the AI is less sure about go to a person. Default 0.7; raise it to automate less.
Team Telegram chat
Chat id of the group or channel that receives every message a person must handle.
Sales Telegram chat (optional)
Receives new sales leads. Empty: the team chat.
Support Telegram chat (optional)
Receives new support tickets. Empty: the team chat.
Team language (optional)
Language of the Telegram messages and of the AI summary: en or ar. Customers always get their own language.

Supported runtime

n8n >=2.42.0 <3.0.0

Jervis Runtime support for catalog flows is planned.

Documentation

Installation, configuration, troubleshooting and architecture guides are included in the package.

What's new in 1.0.0

Released October 7, 2026

Added

• Message intake through an authenticated webhook: validation, plain-text storage, email or phone required,

• control and bidi-override characters removed, Arabic digits in phone numbers accepted.

• A stable message id from the Idempotency-Key header or messageId field, or derived from the contact, the

• text and the day; a reference (S-…) derived from it.

• The Messages tab as the flow's memory: every message is claimed there before anything else happens; repeat

• deliveries and same-second races are answered duplicate and do nothing.

• Classification with OpenAI Structured Outputs (strict JSON schema): sales, support, FAQ or other, a confidence,

• one of your FAQ ids and a one-line summary. Name, email and phone are not sent; requests use store: false.

• Routing: sales to the Leads tab and sales chat, support to a ticket in the Tickets tab and the support chat, FAQ

• questions answered by email with your own answer in the customer's language.

• Human escalation on Telegram for low confidence, "other", FAQ questions without a matching entry,

• contradictory, malformed or refused AI answers, OpenAI failures and failed leads, tickets or FAQ emails.

• Optional acknowledgement email with the customer's reference.

• Customer emails carry no text from the message (fixed subjects; the name only when it is a plain name), and at

• most 3 go to one address in 24 hours.

• Rows are claimed with a unique claimId, safe when n8n's execution ids start again.

• A repeat of a message whose processing stopped alerts the team chat once instead of being dropped silently; the

• attempt and its outcome are recorded in the original row, so later repeats send nothing.

• The losing row of a same-second race is marked duplicate by its claimId, never deleted, so sorting or

• editing the tab cannot make the flow remove or change another message's row.

• Links are removed from the AI summary; Telegram excerpts are cut by code points; GPT-5 and o-series models

• are asked for low reasoning effort.

• No automatic retry of writes and sends that may have gone through (leads, tickets, emails, Telegram); reads,

• the classification and the Messages update retry.

• Import-tested in a clean n8n 2.42.3 against fake Google Sheets, OpenAI, SMTP and Telegram.