Advanced Lead Intake: 10-Field Mapping to Supabase & Telegram

{

“name”: “High-Integrity 10-Field Lead Intake with Supabase & Telegram”,

“nodes”: [

{

“parameters”: {

“httpMethod”: “POST”,

“options”: {

“responseData”: “allEntries”

    },

“path”: “layer-1-perception”,

“responseMode”: “onReceived”

  },

“typeVersion”: 2.1,

“type”: “n8n-nodes-base.webhook”,

“id”: “webhook-node-id”,

“position”: [112, 112],

“name”: “Webhook”,

“webhookId”: “fcd6fc5c-1024-4b64-97fe-d8d46b410e49”

},

{

“parameters”: {

“dataToSend”: “defineBelow”,

“fieldsUi”: {

“fieldValues”: [

        { "fieldId": "name", "fieldValue": "={{ $('Webhook').item.json.body.fullName }}" },

        { "fieldId": "email", "fieldValue": "={{ $('Webhook').item.json.body.email }}" },

        { "fieldId": "company", "fieldValue": "={{ $('Webhook').item.json.body.company }}" },

        { "fieldId": "budget", "fieldValue": "={{ $('Webhook').item.json.body.budget }}" },

        { "fieldId": "project_type", "fieldValue": "={{ $('Webhook').item.json.body.projectType }}" },

        { "fieldId": "timeline", "fieldValue": "={{ $('Webhook').item.json.body.timeline }}" },

        { "fieldId": "stack", "fieldValue": "={{ $('Webhook').item.json.body.techStack }}" },

        { "fieldId": "goal", "fieldValue": "={{ $('Webhook').item.json.body.goal }}" },

        { "fieldId": "notes", "fieldValue": "=Industry: {{ $('Webhook').item.json.body.industry }} | Phone: {{ $('Webhook').item.json.body.phone }}" }

      \]

    },

“operation”: “create”,

“resource”: “row”,

“tableId”: “leads”

  },

“id”: “bed95657-8072-4b65-bd5d-cfc56b1a3fcb”,

“name”: “Supabase: Save Lead”,

“type”: “n8n-nodes-base.supabase”,

“typeVersion”: 1,

“position”: [544, 112],

“credentials”: {}

},

{

“parameters”: {

“chatId”: “={{ $node[\“:wrench: Configuration\”].json.TELEGRAM_CHAT_ID }}”,

“operation”: “sendMessage”,

“text”: “=🚀 *New Lead Received!*\\n\\n*Name:* {{ $(‘Webhook’).item.json.body.fullName }}\\n*Email:* {{ $(‘Webhook’).item.json.body.email }}\\n*Company:* {{ $(‘Webhook’).item.json.body.company }}\\n*Industry:* {{ $(‘Webhook’).item.json.body.industry }}\\n*Project:* {{ $(‘Webhook’).item.json.body.projectType }}\\n*Budget:* {{ $(‘Webhook’).item.json.body.budget }}\\n*Timeline:* {{ $(‘Webhook’).item.json.body.timeline }}\\n*Phone:* {{ $(‘Webhook’).item.json.body.phone }}\\n*Tech Stack:* {{ $(‘Webhook’).item.json.body.techStack }}\\n*Goal:* {{ $(‘Webhook’).item.json.body.goal }}\\n\\n_System: pandian-ai.com_”

  },

“id”: “c1fa39f7-d5f5-46c0-95f4-dda00aab0779”,

“name”: “Telegram: Alert Pandian”,

“type”: “n8n-nodes-base.telegram”,

“typeVersion”: 1.2,

“position”: [768, 112],

“webhookId”: “4015b370-9b4a-450d-8015-ab46fcacef59”,

“credentials”: {}

},

{

“id”: “e18ead58-dd75-4829-b5a1-013cebb004e3”,

“name”: “:wrench: Configuration”,

“type”: “n8n-nodes-base.set”,

“typeVersion”: 1,

“position”: [320, 112],

“parameters”: {

“values”: {

“string”: [

        {

“name”: “TELEGRAM_CHAT_ID”,

“value”: “YOUR_CHAT_ID”

        }

      \]

    }

  }

}

],

“connections”: {

“Supabase: Save Lead”: { “main”: [[{ “node”: “Telegram: Alert Pandian”, “type”: “main”, “index”: 0 }]] },

“Webhook”: { “main”: [[{ “node”: “:wrench: Configuration”, “type”: “main”, “index”: 0 }]] },

:wrench: Configuration”: { “main”: [[{ “node”: “Supabase: Save Lead”, “type”: “main”, “index”: 0 }]] }

}

}

I’ve developed this architecture to handle complex lead data from high-end landing pages. It ensures data integrity across 10 normalized fields and provides real-time notifications.

Check it out at: https://pandian-ai.com

Nice idea, especially the Webhook Supabase Telegram path. This is a solid pattern for lead intake.

A few production notes before others copy/import it:

  1. The JSON shown here uses smart quotes, so it may not import directly into n8n unless converted back to normal JSON quotes.

  2. You call it a 10-field normalized intake, but industry and phone are currently merged into the notes field:

Industry: … | Phone: …

That makes them harder to filter, search, validate, or report on later. I’d recommend storing them as separate Supabase columns if data integrity is the goal.

  1. I’d add a validation/normalization step before Supabase:
    required fields: name, email, project type
    validate email format
    normalize phone
    handle missing optional fields
    sanitize Telegram message values

  2. Since the Webhook uses responseMode: onReceived, the caller receives success before Supabase or Telegram actually finishes. That is fine for speed, but not ideal if you need guaranteed intake. For higher integrity, consider responding only after the Supabase insert succeeds, or add a proper error workflow.

  3. Telegram Markdown can break if user-submitted values contain _, *, [, etc. Either escape the values or use plain text / HTML mode carefully.

Suggested production flow:

Webhook
Validate & Normalize Lead
Supabase Insert/Upsert
Telegram Notification
Respond to Webhook

Plus an Error Trigger workflow for failed inserts or failed Telegram alerts.

Overall, good structure I’d just separate the fields fully and add validation/error handling before calling it high-integrity.