-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Expand file tree
/
Copy pathWebsite leads to Google Sheets with Telegram alert and auto-reply (Italian).json
More file actions
176 lines (176 loc) · 5.35 KB
/
Copy pathWebsite leads to Google Sheets with Telegram alert and auto-reply (Italian).json
File metadata and controls
176 lines (176 loc) · 5.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
{
"name": "01 - Lead dal sito → Registro + Notifiche",
"nodes": [
{
"parameters": {
"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).",
"height": 420,
"width": 400
},
"id": "nota-setup",
"name": "Nota di setup",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [-60, -220]
},
{
"parameters": {
"httpMethod": "POST",
"path": "nuovo-lead",
"options": {}
},
"id": "webhook-lead",
"name": "Nuovo lead dal sito",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [400, 0]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "a1",
"name": "nome",
"value": "={{ $json.body.nome || $json.body.name || 'Non indicato' }}",
"type": "string"
},
{
"id": "a2",
"name": "email",
"value": "={{ $json.body.email || '' }}",
"type": "string"
},
{
"id": "a3",
"name": "telefono",
"value": "={{ $json.body.telefono || $json.body.phone || 'Non indicato' }}",
"type": "string"
},
{
"id": "a4",
"name": "messaggio",
"value": "={{ $json.body.messaggio || $json.body.message || '' }}",
"type": "string"
},
{
"id": "a5",
"name": "data",
"value": "={{ $now.format('dd/MM/yyyy HH:mm') }}",
"type": "string"
}
]
},
"options": {}
},
"id": "set-campi",
"name": "Estrai campi del lead",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [620, 0]
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"mode": "list",
"value": ""
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": ""
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Data": "={{ $json.data }}",
"Nome": "={{ $json.nome }}",
"Email": "={{ $json.email }}",
"Telefono": "={{ $json.telefono }}",
"Messaggio": "={{ $json.messaggio }}",
"Stato": "Nuovo"
}
},
"options": {}
},
"id": "sheets-append",
"name": "Salva nel Registro Lead",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [840, 0]
},
{
"parameters": {
"chatId": "INSERISCI-CHAT-ID",
"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ù._",
"additionalFields": {
"parse_mode": "Markdown"
}
},
"id": "telegram-notifica",
"name": "Avvisami su Telegram",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [1060, -120]
},
{
"parameters": {
"sendTo": "={{ $('Estrai campi del lead').item.json.email }}",
"subject": "Abbiamo ricevuto la tua richiesta ✔",
"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": {}
},
"id": "gmail-cortesia",
"name": "Email di cortesia al cliente",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [1060, 120]
}
],
"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
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"pinData": {}
}