Agentrix212AI commited on
Commit
0213bf4
·
verified ·
1 Parent(s): 7bc11c1

Upload Lead Qualification + WhatsApp.json

Browse files
Workflows/N8N_Workflows/Lead Qualification + WhatsApp/Lead Qualification + WhatsApp.json ADDED
@@ -0,0 +1,478 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "Lead Qualification + WhatsApp",
3
+ "nodes": [
4
+ {
5
+ "parameters": {
6
+ "events": [
7
+ "BOOKING_CREATED"
8
+ ],
9
+ "options": {}
10
+ },
11
+ "type": "n8n-nodes-base.calTrigger",
12
+ "typeVersion": 2,
13
+ "position": [
14
+ -880,
15
+ 16
16
+ ],
17
+ "id": "f35b112f-dee9-49e2-8f29-2a8a65094208",
18
+ "name": "📅 Cal.com Trigger",
19
+ "webhookId": "6fa888f6-7b42-495b-8a74-dd13ea19e3c7",
20
+ "credentials": {
21
+ "calApi": {
22
+ "id": "QAp2NYBKhGw6J0xM",
23
+ "name": "Cal account"
24
+ }
25
+ }
26
+ },
27
+ {
28
+ "parameters": {
29
+ "operation": "send",
30
+ "phoneNumberId": "896248000230657",
31
+ "recipientPhoneNumber": "={{ $('Extract Data').item.json.whatsapp }}",
32
+ "textBody": "={{ $json.output.message }}",
33
+ "additionalFields": {}
34
+ },
35
+ "type": "n8n-nodes-base.whatsApp",
36
+ "typeVersion": 1.1,
37
+ "position": [
38
+ 320,
39
+ -96
40
+ ],
41
+ "id": "d6d82038-1ce6-4df4-95e0-e8192310626e",
42
+ "name": "4️⃣ Send WhatsApp",
43
+ "webhookId": "6fa7838e-17e2-4d21-8ef9-9adc88fc30c1",
44
+ "credentials": {
45
+ "whatsAppApi": {
46
+ "id": "Y9M96ixI4NlpizmQ",
47
+ "name": "WhatsApp account"
48
+ }
49
+ }
50
+ },
51
+ {
52
+ "parameters": {
53
+ "operation": "append",
54
+ "documentId": {
55
+ "__rl": true,
56
+ "value": "1UGWpraMjN4hmIh16ueUgaOIAENOfjmkUK_44phq8ASE",
57
+ "mode": "list",
58
+ "cachedResultName": "Agentrix212_Leads_Template",
59
+ "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UGWpraMjN4hmIh16ueUgaOIAENOfjmkUK_44phq8ASE/edit?usp=drivesdk"
60
+ },
61
+ "sheetName": {
62
+ "__rl": true,
63
+ "value": 1720662659,
64
+ "mode": "list",
65
+ "cachedResultName": "Agentrix212_Leads_Template.csv",
66
+ "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UGWpraMjN4hmIh16ueUgaOIAENOfjmkUK_44phq8ASE/edit#gid=1720662659"
67
+ },
68
+ "columns": {
69
+ "mappingMode": "defineBelow",
70
+ "value": {
71
+ "Timestamp": "={{ $now.format('yyyy-MM-dd HH:mm') }}",
72
+ "Full name": "={{ $('Extract Data').item.json.name }}",
73
+ "Email": "={{ $('Extract Data').item.json.email }}",
74
+ "Event": "={{ $('📅 Cal.com Trigger').item.json.title }}",
75
+ "Event Time": "={{ $('Extract Data').item.json.eventTime }}",
76
+ "Status": "QUALIFIED",
77
+ "Response Status": "MESSAGE_SENT",
78
+ "Budget": "={{ $('Extract Data').item.json.budget }}",
79
+ "Pain Points": "={{ $('Extract Data').item.json.painPoints }}",
80
+ "Source": "ca.com"
81
+ },
82
+ "matchingColumns": [],
83
+ "schema": [
84
+ {
85
+ "id": "Timestamp",
86
+ "displayName": "Timestamp",
87
+ "required": false,
88
+ "defaultMatch": false,
89
+ "display": true,
90
+ "type": "string",
91
+ "canBeUsedToMatch": true
92
+ },
93
+ {
94
+ "id": "Full name",
95
+ "displayName": "Full name",
96
+ "required": false,
97
+ "defaultMatch": false,
98
+ "display": true,
99
+ "type": "string",
100
+ "canBeUsedToMatch": true
101
+ },
102
+ {
103
+ "id": "Email",
104
+ "displayName": "Email",
105
+ "required": false,
106
+ "defaultMatch": false,
107
+ "display": true,
108
+ "type": "string",
109
+ "canBeUsedToMatch": true
110
+ },
111
+ {
112
+ "id": "WhatsApp",
113
+ "displayName": "WhatsApp",
114
+ "required": false,
115
+ "defaultMatch": false,
116
+ "display": true,
117
+ "type": "string",
118
+ "canBeUsedToMatch": true,
119
+ "removed": true
120
+ },
121
+ {
122
+ "id": "Budget",
123
+ "displayName": "Budget",
124
+ "required": false,
125
+ "defaultMatch": false,
126
+ "display": true,
127
+ "type": "string",
128
+ "canBeUsedToMatch": true,
129
+ "removed": false
130
+ },
131
+ {
132
+ "id": "Event",
133
+ "displayName": "Event",
134
+ "required": false,
135
+ "defaultMatch": false,
136
+ "display": true,
137
+ "type": "string",
138
+ "canBeUsedToMatch": true
139
+ },
140
+ {
141
+ "id": "Event Time",
142
+ "displayName": "Event Time",
143
+ "required": false,
144
+ "defaultMatch": false,
145
+ "display": true,
146
+ "type": "string",
147
+ "canBeUsedToMatch": true
148
+ },
149
+ {
150
+ "id": "Pain Points",
151
+ "displayName": "Pain Points",
152
+ "required": false,
153
+ "defaultMatch": false,
154
+ "display": true,
155
+ "type": "string",
156
+ "canBeUsedToMatch": true,
157
+ "removed": false
158
+ },
159
+ {
160
+ "id": "Status",
161
+ "displayName": "Status",
162
+ "required": false,
163
+ "defaultMatch": false,
164
+ "display": true,
165
+ "type": "string",
166
+ "canBeUsedToMatch": true
167
+ },
168
+ {
169
+ "id": "Response Status",
170
+ "displayName": "Response Status",
171
+ "required": false,
172
+ "defaultMatch": false,
173
+ "display": true,
174
+ "type": "string",
175
+ "canBeUsedToMatch": true
176
+ },
177
+ {
178
+ "id": "Source",
179
+ "displayName": "Source",
180
+ "required": false,
181
+ "defaultMatch": false,
182
+ "display": true,
183
+ "type": "string",
184
+ "canBeUsedToMatch": true,
185
+ "removed": false
186
+ }
187
+ ],
188
+ "attemptToConvertTypes": false,
189
+ "convertFieldsToString": false
190
+ },
191
+ "options": {}
192
+ },
193
+ "type": "n8n-nodes-base.googleSheets",
194
+ "typeVersion": 4.4,
195
+ "position": [
196
+ 528,
197
+ -96
198
+ ],
199
+ "id": "8113c0f1-765b-4eb5-a510-14cb2e42cff3",
200
+ "name": "5️⃣ Save Qualified",
201
+ "credentials": {
202
+ "googleSheetsOAuth2Api": {
203
+ "id": "cqc0aG1cc1RyiagA",
204
+ "name": "Google Sheets account"
205
+ }
206
+ }
207
+ },
208
+ {
209
+ "parameters": {
210
+ "operation": "append",
211
+ "documentId": {
212
+ "__rl": true,
213
+ "value": "1rMgNKIf5Pq32jzdyfLSgHYVBfjlRuE8d-CrfaxLYTqs"
214
+ },
215
+ "sheetName": {
216
+ "__rl": true,
217
+ "value": 885562620
218
+ },
219
+ "columns": {
220
+ "mappingMode": "defineBelow",
221
+ "value": {
222
+ "Timestamp": "={{ $now.format('yyyy-MM-dd HH:mm') }}",
223
+ "Full name": "={{ $json.name }}",
224
+ "Email": "={{ $json.email }}",
225
+ "WhatsApp": "={{ $json.whatsapp }}",
226
+ "Event": "={{ $json.eventName }}",
227
+ "Event Time": "={{ $json.eventTime }}",
228
+ "Status": "NOT_QUALIFIED",
229
+ "Response Status": "={{ $json.reason }}"
230
+ }
231
+ },
232
+ "options": {}
233
+ },
234
+ "type": "n8n-nodes-base.googleSheets",
235
+ "typeVersion": 4.4,
236
+ "position": [
237
+ 96,
238
+ 176
239
+ ],
240
+ "id": "62bc0426-fc17-469e-a167-d62ad25c1b0c",
241
+ "name": "5️⃣ Save Unqualified",
242
+ "credentials": {
243
+ "googleSheetsOAuth2Api": {
244
+ "id": "cqc0aG1cc1RyiagA",
245
+ "name": "Google Sheets account"
246
+ }
247
+ }
248
+ },
249
+ {
250
+ "parameters": {
251
+ "amount": 1
252
+ },
253
+ "type": "n8n-nodes-base.wait",
254
+ "typeVersion": 1.1,
255
+ "position": [
256
+ 80,
257
+ -96
258
+ ],
259
+ "id": "960a97d0-5636-437a-b3d3-fe89062dc357",
260
+ "name": "Wait",
261
+ "webhookId": "b1a38a55-23aa-465c-a3ee-a9a93f3018b2"
262
+ },
263
+ {
264
+ "parameters": {
265
+ "model": "deepseek/deepseek-chat-v3.1",
266
+ "options": {}
267
+ },
268
+ "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
269
+ "typeVersion": 1,
270
+ "position": [
271
+ -592,
272
+ 224
273
+ ],
274
+ "id": "3dc2a8a2-03b9-4ec6-913c-2da225259313",
275
+ "name": "OpenRouter Chat Model",
276
+ "credentials": {
277
+ "openRouterApi": {
278
+ "id": "Uh6EhUnlPGQ0AEYw",
279
+ "name": "OpenRouter account"
280
+ }
281
+ }
282
+ },
283
+ {
284
+ "parameters": {
285
+ "jsonSchemaExample": "{\n \"isQualified\": true,\n \"qualificationScore\": 8,\n \"reason\": \"Budget 3000, clear automation pain points\",\n \"message\": \"Hi Mouad! Thanks for booking. We'll discuss RAG on Nov 27 at 7:00 PM. Please confirm? 🚀\"\n}"
286
+ },
287
+ "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
288
+ "typeVersion": 1.3,
289
+ "position": [
290
+ -336,
291
+ 224
292
+ ],
293
+ "id": "a99e5ae8-2648-4182-8e47-fcb87495bc34",
294
+ "name": "Structured Output Parser"
295
+ },
296
+ {
297
+ "parameters": {
298
+ "promptType": "define",
299
+ "text": "=You are a lead qualifier and WhatsApp message writer for Agentrix212.\n\nLEAD DATA:\nName: {{ $json.name }}\nBudget: {{ $json.budget }}\nPain Points: {{ $json.painPoints }}\nEvent: {{ $json.eventName }}\nTime: {{ $json.eventTime }}\n",
300
+ "hasOutputParser": true,
301
+ "messages": {
302
+ "messageValues": [
303
+ {
304
+ "message": "You are a strict lead qualifier. Only qualify serious leads with sufficient budget. \n\nQUALIFY: 1. Budget must be >= $1000 2. Pain points must mention: automation, workflow, efficiency, RAG, implementation 3. Serious response (2+ sentences) IF QUALIFIED: Generate WhatsApp message (max 50 words): - Thank them - Mention their event - tell me tham that we can help them with their pain point - Confirm time - Ask to confirm and you might also ask any clarification questions to keep the lead hot and interested or one - Be friendly RESPOND ONLY: { \"isQualified\": true/false, \"qualificationScore\": 1-10, \"reason\": \"brief reason\", \"message\": \"your message or empty string\" }"
305
+ }
306
+ ]
307
+ },
308
+ "batching": {}
309
+ },
310
+ "type": "@n8n/n8n-nodes-langchain.chainLlm",
311
+ "typeVersion": 1.7,
312
+ "position": [
313
+ -480,
314
+ 16
315
+ ],
316
+ "id": "5be12cb2-24f0-4330-81cf-0bb01c6bfe45",
317
+ "name": " AI: Qualify + Message"
318
+ },
319
+ {
320
+ "parameters": {
321
+ "mode": "raw",
322
+ "jsonOutput": "={\n \"name\": \"{{ $json.attendees[0].name }}\",\n \"email\": \"{{ $json.responses.email.value }}\",\n \"whatsapp\": \"{{ $json.responses.attendeePhoneNumber.value }}\",\n \"budget\": \"{{ $json.responses.Budget.value }}\",\n \"painPoints\": \"{{ $json.responses.notes.value }}\",\n \"eventName\": \"{{ $json.eventTitle }}\",\n \"eventTime\": \"{{ $json.startTime }}\"\n}",
323
+ "options": {}
324
+ },
325
+ "type": "n8n-nodes-base.set",
326
+ "typeVersion": 3.4,
327
+ "position": [
328
+ -656,
329
+ 16
330
+ ],
331
+ "id": "05a5b04b-5cd3-4096-81bc-a7a95ba7041c",
332
+ "name": "Extract Data"
333
+ },
334
+ {
335
+ "parameters": {
336
+ "conditions": {
337
+ "options": {
338
+ "caseSensitive": true,
339
+ "leftValue": "",
340
+ "typeValidation": "strict",
341
+ "version": 1
342
+ },
343
+ "conditions": [
344
+ {
345
+ "id": "40f41e3c-8a5f-4e4c-b3e2-0c79814a3f7c",
346
+ "leftValue": "={{ $json.output.isQualified }}",
347
+ "rightValue": "",
348
+ "operator": {
349
+ "type": "boolean",
350
+ "operation": "true",
351
+ "singleValue": true
352
+ }
353
+ }
354
+ ],
355
+ "combinator": "and"
356
+ },
357
+ "options": {}
358
+ },
359
+ "type": "n8n-nodes-base.if",
360
+ "typeVersion": 2,
361
+ "position": [
362
+ -144,
363
+ 32
364
+ ],
365
+ "id": "a217f6c9-64fa-46cf-af67-aad5047ddd9b",
366
+ "name": "Is Qualified?"
367
+ }
368
+ ],
369
+ "pinData": {},
370
+ "connections": {
371
+ "📅 Cal.com Trigger": {
372
+ "main": [
373
+ [
374
+ {
375
+ "node": "Extract Data",
376
+ "type": "main",
377
+ "index": 0
378
+ }
379
+ ]
380
+ ]
381
+ },
382
+ "4️⃣ Send WhatsApp": {
383
+ "main": [
384
+ [
385
+ {
386
+ "node": "5️⃣ Save Qualified",
387
+ "type": "main",
388
+ "index": 0
389
+ }
390
+ ]
391
+ ]
392
+ },
393
+ "Wait": {
394
+ "main": [
395
+ [
396
+ {
397
+ "node": "4️⃣ Send WhatsApp",
398
+ "type": "main",
399
+ "index": 0
400
+ }
401
+ ]
402
+ ]
403
+ },
404
+ "OpenRouter Chat Model": {
405
+ "ai_languageModel": [
406
+ [
407
+ {
408
+ "node": " AI: Qualify + Message",
409
+ "type": "ai_languageModel",
410
+ "index": 0
411
+ }
412
+ ]
413
+ ]
414
+ },
415
+ "Structured Output Parser": {
416
+ "ai_outputParser": [
417
+ [
418
+ {
419
+ "node": " AI: Qualify + Message",
420
+ "type": "ai_outputParser",
421
+ "index": 0
422
+ }
423
+ ]
424
+ ]
425
+ },
426
+ " AI: Qualify + Message": {
427
+ "main": [
428
+ [
429
+ {
430
+ "node": "Is Qualified?",
431
+ "type": "main",
432
+ "index": 0
433
+ }
434
+ ]
435
+ ]
436
+ },
437
+ "Extract Data": {
438
+ "main": [
439
+ [
440
+ {
441
+ "node": " AI: Qualify + Message",
442
+ "type": "main",
443
+ "index": 0
444
+ }
445
+ ]
446
+ ]
447
+ },
448
+ "Is Qualified?": {
449
+ "main": [
450
+ [
451
+ {
452
+ "node": "Wait",
453
+ "type": "main",
454
+ "index": 0
455
+ }
456
+ ],
457
+ [
458
+ {
459
+ "node": "5️⃣ Save Unqualified",
460
+ "type": "main",
461
+ "index": 0
462
+ }
463
+ ]
464
+ ]
465
+ }
466
+ },
467
+ "active": true,
468
+ "settings": {
469
+ "executionOrder": "v1"
470
+ },
471
+ "versionId": "abc217e5-6429-4610-92ce-7dd144f714d6",
472
+ "meta": {
473
+ "templateCredsSetupCompleted": true,
474
+ "instanceId": "66c58b798d3adbdaf64a47b3041d335e10015ca13cec5104fbf9f568a82eba73"
475
+ },
476
+ "id": "gnEE9aSXeQozXNRS",
477
+ "tags": []
478
+ }