Skip to content
Premium flowSalesAdvanced setupAbout 45 min to set upMessages in English · Arabic

AI Lead Qualification

Every website lead is scored 0–100 by OpenAI for fit, intent, service and urgency, saved to Google Sheets as hot, warm or cold, and routed: hot leads alert your closers on Telegram at once.

What can you use this flow for?

  • Prioritize incoming enquiries as hot, warm or cold for a sales team.
  • Qualify leads by service fit, intent and urgency before they reach a CRM.

What you need before starting

  • An n8n instance, private lead-intake webhook and a Google Sheet for scoring output.
  • An OpenAI API key with API billing enabled, plus Google Sheets and Telegram credentials.

How to set it up

  1. Request the licensed premium flow and import it to n8n.
  2. Connect Header Auth, OpenAI API, Google Sheets and Telegram credentials.
  3. Fill in businessDescription, services, score thresholds, spreadsheetId and sales chat destinations.
  4. Submit safe sample leads and verify scores, routing and human review for uncertain cases.

OpenAI API usage is billed separately from ChatGPT or Claude subscriptions; AI scoring is advisory, not a definitive eligibility decision.

The package includes detailed installation, configuration and troubleshooting guides.

Works with

  • Google Sheets
  • OpenAI
  • Telegram
  • Webhook

Requirements

  • Webhook token (Header Auth)
  • Google service account (JSON key)
  • OpenAI API key
  • Telegram bot

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

Settings you'll fill in

Leads spreadsheet
The spreadsheet's URL or id. Share it with the service account email as Editor.
Sheet (tab) name
The tab that holds the leads. It must exist; when it is empty, the flow writes the header row itself.
Your services
What you sell, separated by ";" or one per line (up to 30). The AI matches every lead to one of these or "other".
About your business (optional)
Two or three sentences: who you serve, typical project size, what makes a good customer. Better context, better scores. Up to 1000 characters.
Sales Telegram chat
Chat id of the sales group or channel that receives warm leads (and hot leads when the next field is empty).
Hot leads Telegram chat (optional)
Optional separate chat for hot leads, e.g. your closers. Empty: hot leads go to the sales chat.
Mention on hot leads (optional)
Telegram usernames tagged on every hot lead, separated by spaces. Optional.
Hot from score (optional)
Leads scoring at least this (1–100) are hot. Default 70.
Warm from score (optional)
Leads scoring at least this, but below the hot score, are warm; the rest are cold and stay in the sheet. Default 40.
OpenAI model (optional)
A model that supports Structured Outputs. Default gpt-5-mini: fast and inexpensive.
Default country code (optional)
Calling code added to local numbers such as 0100 123 4567. Leave empty to accept international numbers only.
Returning lead window (days) (optional)
A lead with the same phone or email within this many days is linked to the first inquiry. 0 turns it off. Default 30.
Language (optional)
Language of the Telegram alerts and of the AI summary in the sheet: en or ar.

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

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

• numbers normalised to international format (local numbers, 00 prefixes and Arabic digits included).

• Leads stored in Google Sheets before scoring, with the header row written on first use.

• Qualification with OpenAI Structured Outputs (strict JSON schema): intent, matching service, urgency, budget

• fit, spam, a 0–100 score, a summary and reasons, in English or Arabic.

• Hot, warm and cold categories from configurable score thresholds; spam marked and never alerted.

• Routing: hot leads to a closers' Telegram chat with @mentions, warm leads to the sales chat, cold leads kept in

• the sheet.

• Rule-based fallback score when OpenAI is unavailable or its answer is unusable, shown in the sheet and the alert.

• Replayed deliveries (same event id, or the same contact and message within a day) acknowledged without a

• second AI call; returning leads linked to their first inquiry.

• Privacy: name, phone and email are not sent to OpenAI; requests are sent with store: false.

• Retries for Google Sheets, OpenAI and Telegram.

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