Quick Overview
This workflow receives web form leads via a webhook, normalizes the fields, uses Groq (chat model) to score buying intent and assign a hot/warm/cold tier, saves every lead to Google Sheets, and alerts the team in Slack and the owner in Telegram for hot leads.
How it works
- Receives an inbound lead as a POST request via an n8n webhook.
- Cleans and maps the raw form payload into normalized lead fields (name, email, phone, company, message, submitted time).
- Sends the lead details to Groq through a chat model prompt and parses the response into structured JSON with a score, tier, and reasoning.
- Validates the AI output and falls back to a manual-review result if the score/tier is missing or invalid.
- Appends the qualified lead (including score, tier, and reasoning) to a Google Sheets worksheet.
- If the lead is marked as hot, sends a detailed Telegram alert and posts the lead summary to a Slack channel; otherwise it only posts the Slack summary.
Setup
- Create a Groq API credential (or swap the chat model node to your preferred provider and add the matching credentials).
- Add Google Sheets OAuth2 credentials and update the target spreadsheet and worksheet used for appending leads.
- Add Slack credentials and set the destination channel name/ID (for example, #n8n-leads).
- Add Telegram credentials and replace <YOUR_TELEGRAM_CHAT_ID> with your Telegram chat ID.
- Copy the webhook URL from the webhook trigger and configure your form tool to send lead submissions to it as a POST request.