Quick overview
This workflow captures website form submissions via an n8n webhook, detects English vs Arabic, scores leads with rule-based logic, appends them to Google Sheets, and sends an optional auto-reply plus owner alerts via email and/or Telegram.
How it works
- Receives a POST request on a webhook endpoint from your website contact form.
- Normalizes common field names, detects Arabic vs English, validates required contact details, and blocks bots using a honeypot field (and an optional shared secret header).
- Scores the lead from 0–100 using rule-based keywords and signals (including English and Arabic intent/urgency/spam terms) and assigns a Hot/Warm/Cold tier.
- Calculates a final score (rule-based only unless an AI provider is configured) and formats the lead record to match a predefined Google Sheets header.
- Appends the lead to a Google Sheets tab and returns a JSON response to the form with the lead ID and tier.
- If the lead is not suspected spam, sends an auto-reply email in the detected language and alerts the owner by email and/or Telegram based on configuration.
Setup
- Create a Google Sheet with a tab (default
Leads) and add the exact header columns expected by the workflow, then paste your spreadsheet URL into the configuration.
- Connect Google Sheets credentials and update the sheet tab name and spreadsheet URL in the workflow’s Config values.
- Connect SMTP/Email Send credentials and set the sender address (
fromEmail) and owner notification address (ownerEmail).
- If you want Telegram alerts, enable the Telegram step, connect a Telegram bot credential, and set your
telegramChatId in Config.
- Copy the production webhook URL and configure your website form to POST fields like name/email/phone/service/budget/message (and keep a hidden honeypot field empty), and optionally set
webhookSecret plus the x-webhook-secret header.