WORKFLOW · N8N
01 - Lead dal sito → Registro + Notifiche
Prompts👁 0
WORKFLOW JSON
{
"name": "01 - Lead dal sito → Registro + Notifiche",
"nodes": [
{
"id": "nota-setup",
"name": "Nota di setup",
"type": "n8n-nodes-base.stickyNote",
"position": [
-60,
-220
],
"parameters": {
"width": 400,
"height": 420,
"content": "## ⚙️ CONFIGURAZIONE (5 min)\n\n1. **Webhook**: copia l'URL di produzione del nodo 'Nuovo lead dal sito' e usalo come destinazione del form del tuo sito (WordPress: plugin WPForms/Elementor → webhook; oppure azione POST custom).\n Il form deve inviare i campi: `nome`, `email`, `telefono`, `messaggio`.\n2. **Google Sheets**: collega le credenziali Google e indica il tuo foglio 'Registro Lead' con le colonne: Data | Nome | Email | Telefono | Messaggio | Stato.\n3. **Telegram**: crea un bot con @BotFather, incolla il token nelle credenziali e inserisci il tuo Chat ID.\n4. **Gmail**: collega l'account che invierà l'email di cortesia al cliente.\n\nPoi ATTIVA il workflow (interruttore in alto a destra)."
},
"typeVersion": 1
},
{
"id": "webhook-lead",
"name": "Nuovo lead dal sito",
"type": "n8n-nodes-base.webhook",
"position": [
400,
0
],
"parameters": {
"path": "nuovo-lead",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2
},
{
"id": "set-campi",
"name": "Estrai campi del lead",
"type": "n8n-nodes-base.set",
"position": [
620,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "a1",
"name": "nome",
"type": "string",
"value": "={{ $json.body.nome || $json.body.name || 'Non indicato' }}"
},
{
"id": "a2",
"name": "email",
"type": "string",
"value": "={{ $json.body.email || '' }}"
},
{
"id": "a3",
"name": "telefono",
"type": "string",
"value": "={{ $json.body.telefono || $json.body.phone || 'Non indicato' }}"
},
{
"id": "a4",
"name": "messaggio",
"type": "string",
"value": "={{ $json.body.messaggio || $json.body.message || '' }}"
},
{
"id": "a5",
"name": "data",
"type": "string",
"value": "={{ $now.format('dd/MM/yyyy HH:mm') }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "sheets-append",
"name": "Salva nel Registro Lead",
"type": "n8n-nodes-base.googleSheets",
"position": [
840,
0
],
"parameters": {
"columns": {
"value": {
"Data": "={{ $json.data }}",
"Nome": "={{ $json.nome }}",
"Email": "={{ $json.email }}",
"Stato": "Nuovo",
"Telefono": "={{ $json.telefono }}",
"Messaggio": "={{ $json.messaggio }}"
},
"mappingMode": "defineBelow"
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": ""
},
"documentId": {
"__rl": true,
"mode": "list",
"value": ""
}
},
"typeVersion": 4.5
},
{
"id": "telegram-notifica",
"name": "Avvisami su Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
1060,
-120
],
"parameters": {
"text": "=🔔 *Nuovo lead dal sito!*\n\n👤 {{ $json.Nome }}\n📧 {{ $json.Email }}\n📞 {{ $json.Telefono }}\n\n💬 {{ $json.Messaggio }}\n\n_Rispondi entro 1 ora: i lead caldi si chiudono 7 volte di più._",
"chatId": "INSERISCI-CHAT-ID",
"additionalFields": {
"parse_mode": "Markdown"
}
},
"typeVersion": 1.2
},
{
"id": "gmail-cortesia",
"name": "Email di cortesia al cliente",
"type": "n8n-nodes-base.gmail",
"position": [
1060,
120
],
"parameters": {
"sendTo": "={{ $('Estrai campi del lead').item.json.email }}",
"message": "=Ciao {{ $('Estrai campi del lead').item.json.nome }},\n\ngrazie per averci contattato! Abbiamo ricevuto la tua richiesta e ti risponderemo entro poche ore lavorative.\n\nNel frattempo, se la cosa è urgente, puoi chiamarci direttamente.\n\nA presto,\n[IL TUO NOME / AZIENDA]",
"options": {},
"subject": "Abbiamo ricevuto la tua richiesta ✔"
},
"typeVersion": 2.1
}
],
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"connections": {
"Nuovo lead dal sito": {
"main": [
[
{
"node": "Estrai campi del lead",
"type": "main",
"index": 0
}
]
]
},
"Estrai campi del lead": {
"main": [
[
{
"node": "Salva nel Registro Lead",
"type": "main",
"index": 0
}
]
]
},
"Salva nel Registro Lead": {
"main": [
[
{
"node": "Avvisami su Telegram",
"type": "main",
"index": 0
},
{
"node": "Email di cortesia al cliente",
"type": "main",
"index": 0
}
]
]
}
}
}RELATED WORKFLOWS
COMMENTS
No comments yet — be the first.
