forked from enescingoz/awesome-n8n-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAutomate Sales Meeting Prep with AI & APIFY Sent To WhatsApp.json
More file actions
1859 lines (1859 loc) · 42.2 KB
/
Copy pathAutomate Sales Meeting Prep with AI & APIFY Sent To WhatsApp.json
File metadata and controls
1859 lines (1859 loc) · 42.2 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"meta": {
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9"
},
"nodes": [
{
"id": "201ef455-2d65-4563-8ec1-318211b1fa6a",
"name": "Get Message Contents",
"type": "n8n-nodes-base.gmail",
"position": [
2080,
500
],
"webhookId": "fa1d496f-17fa-4e50-bae9-84ca85ed4502",
"parameters": {
"simple": false,
"options": {},
"messageId": "={{ $json.id }}",
"operation": "get"
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "ded010af-e977-4c47-87dd-8221d601af74",
"name": "Simplify Emails",
"type": "n8n-nodes-base.set",
"position": [
2240,
500
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "2006c806-42db-4457-84c2-35f59ed39018",
"name": "date",
"type": "string",
"value": "={{ $json.date }}"
},
{
"id": "872278d2-b97c-45ba-a9d3-162f154fe7dc",
"name": "subject",
"type": "string",
"value": "={{ $json.subject }}"
},
{
"id": "282f03e9-1d0f-4a17-b9ed-75b44171d4ee",
"name": "text",
"type": "string",
"value": "={{ $json.text }}"
},
{
"id": "9421776c-ff53-4490-b0e1-1e610534ba25",
"name": "from",
"type": "string",
"value": "={{ $json.from.value[0].name }} ({{ $json.from.value[0].address }})"
},
{
"id": "3b6716e8-5582-4da3-ae9d-e8dd1afad530",
"name": "to",
"type": "string",
"value": "={{ $json.to.value[0].name }} ({{ $json.to.value[0].address }})"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "816bf787-ff9c-4b97-80ac-4b0c6ae5638b",
"name": "Check For Upcoming Meetings",
"type": "n8n-nodes-base.googleCalendar",
"position": [
526,
-180
],
"parameters": {
"limit": 1,
"options": {
"orderBy": "startTime",
"timeMax": "={{ $now.toUTC().plus(1, 'hour') }}",
"timeMin": "={{ $now.toUTC() }}",
"singleEvents": true
},
"calendar": {
"__rl": true,
"mode": "list",
"value": "c_5792bdf04bc395cbcbc6f7b754268245a33779d36640cc80a357711aa2f09a0a@group.calendar.google.com",
"cachedResultName": "n8n-events"
},
"operation": "getAll"
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "kWMxmDbMDDJoYFVK",
"name": "Google Calendar account"
}
},
"typeVersion": 1.2
},
{
"id": "234d5c79-bf40-44bb-8829-c6ccf8648359",
"name": "OpenAI Chat Model2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
920,
-20
],
"parameters": {
"model": "gpt-4o-2024-08-06",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "445aa0f4-d41a-4d46-aa2f-e79a9cdb04b5",
"name": "Extract Attendee Information",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
920,
-180
],
"parameters": {
"text": "=start: {{ $json.start.dateTime }}\nmeeting url: {{ $json.hangoutLink }}\nsummary: {{ $json.summary }}\ndescription: {{ $json.description }}\norganiser: {{ $json.organizer.displayName }} ({{ $json.organizer.email }})\nattendees: {{ $json.attendees.filter(item => !item.organizer).map(item => item.email).join(',') }}",
"options": {
"systemPromptTemplate": "You are an expert extraction algorithm. Try to link any information found in the description to help fill in the attendee details.\nIf you do not know the value of an attribute asked to extract, you may omit the attribute's value."
},
"schemaType": "manual",
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"attendees\": {\n \"type\": \"array\",\n \"description\": \"list of attendees excluding the meeting organiser\",\n \"items\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"properties\": {\n\t\t\t \"name\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"linkedin_url\": { \"type\": \"string\" }\n\t\t\t}\n }\n\t\t}\n\t}\n}"
},
"typeVersion": 1
},
{
"id": "390743d8-acfd-4951-8901-212f162dcbb4",
"name": "Execute Workflow Trigger",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
920,
580
],
"parameters": {},
"typeVersion": 1
},
{
"id": "ea9c76a0-40a0-413a-a93a-ad99069d0d91",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2460,
640
],
"parameters": {
"model": "gpt-4o-2024-08-06",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "8d9df9e4-1815-44a2-a6fc-a9af42a77153",
"name": "Get Last Correspondence",
"type": "n8n-nodes-base.gmail",
"position": [
1740,
500
],
"webhookId": "b00c960c-3689-4fa1-9f0f-7d6c9479f0c6",
"parameters": {
"limit": 1,
"filters": {
"sender": "={{ $json.email }}"
},
"operation": "getAll"
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1,
"alwaysOutputData": true
},
{
"id": "23c7161f-60e2-4a99-9279-ff1dca5efc1c",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
4020,
1320
],
"parameters": {
"model": "gpt-4o-2024-08-06",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "9ab535aa-bd8c-4bd6-a7a0-f7182d8d7123",
"name": "OpenAI Chat Model3",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2720,
-20
],
"parameters": {
"model": "gpt-4o-2024-08-06",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "410acb11-a16c-4abd-9f10-7582168d100e",
"name": "WhatsApp Business Cloud",
"type": "n8n-nodes-base.whatsApp",
"position": [
3360,
-140
],
"parameters": {
"textBody": "={{ $json.text }}",
"operation": "send",
"phoneNumberId": "477115632141067",
"requestOptions": {},
"additionalFields": {},
"recipientPhoneNumber": "44123456789"
},
"credentials": {
"whatsAppApi": {
"id": "9SFJPeqrpChOkAmw",
"name": "WhatsApp account"
}
},
"typeVersion": 1
},
{
"id": "a7e8195d-eb73-4acb-aae1-eb04f8290d24",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
-400
],
"parameters": {
"color": 7,
"width": 616.7897454470152,
"height": 449.1424626006906,
"content": "## 1. Periodically Search For Upcoming Meetings\n[Read about the Scheduled Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger)\n\nLet's use the Scheduled Trigger node to trigger our Assistant to notify about upcoming meetings. Here, we'll set it for 1 hour intervals to check for meetings scheduled in our Google Calendar. You may need to play with the intervals and frequency depending on how many meetings you typically have."
},
"typeVersion": 1
},
{
"id": "1aebb209-e440-4ef2-8527-381e5e70b4ea",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
326,
-180
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "95758053-fcc2-45c6-96c2-ec0bf89bcb82",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
820,
-520
],
"parameters": {
"color": 7,
"width": 655.5654775604146,
"height": 670.4114154200236,
"content": "## 2. Extract Attendee Details From Invite\n[Learn more about the Information Extractor node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.information-extractor/)\n\nOnce we have our upcoming meeting, it'll be nice to prepare for it by reminding the user what the meeting is about and some context with the attendees. This will be the goal this template and of our assistant! However, first we'll need to extract some contact information of the attendees to do so.\n\nFor this demonstration, we'll assume that attendee's email and LinkedIn profile URLs are included in the meeting invite. We'll extract this information for each attendee using the Information Extractor node. This convenient node uses AI to parse and extract which saves us from writing complex pattern matching code otherwise.\n\nIn your own scenario, feel free to use your CRM to get this information instead."
},
"typeVersion": 1
},
{
"id": "bd17aed0-9c96-4301-b09b-e61a03ebc1ac",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1500,
-520
],
"parameters": {
"color": 7,
"width": 1020.0959898041108,
"height": 670.8210817031078,
"content": "## 3. Fetch Recent Correspondance & LinkedIn Activity\n[Learn more about the Execute Workflow node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflow)\n\nAs both email fetching and LinkedIn scraping actions are quite complex, we'll split them out as subworkflow executions. Doing so (in my honest opinion), helps with development and maintainability of the template. Here, we'll make perform the research for all applicable attendees by making 2 calls to the subworkflow and merging them back into a single node at the end.\n\nHead over to the subworkflow (see below - step 3a) to see how we pull the summaries from Gmail and LinkedIn."
},
"typeVersion": 1
},
{
"id": "ae804039-32e0-4d2d-a2ef-a6e8d65f7ce2",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2547.540603371386,
-440
],
"parameters": {
"color": 7,
"width": 610.3630186140072,
"height": 582.1201380897592,
"content": "## 4. Generate Pre-Meeting Notification\n[Read more about the Basic LLM node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm)\n\nNow that we have (1) our upcoming meeting details and (2) recent email and/or Linkedin summaries about our attendee, let's feed them into our LLM node to generate the best pre-meeting notification ever seen! Of course, we'll need to keep it short as we intend to send this notification via WhatsApp message but should you choose to use another channel such as email, feel free to adjust the length of the message which suits."
},
"typeVersion": 1
},
{
"id": "045eb1d9-fd80-4f9c-8218-ae66583d0186",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
3180,
-360
],
"parameters": {
"color": 7,
"width": 466.8967433831988,
"height": 454.24485615650235,
"content": "## 5. Send Notification via WhatsApp\n[Learn more about the WhatsApp node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.whatsapp)\n\nThe WhatsApp node is a super convenient way to send messages to WhatsApp which is one of the many messaging apps supported by n8n out of the box. Not using WhatsApp? Simply swap this our for Twilio, Telegram, Slack and others."
},
"typeVersion": 1
},
{
"id": "46d35c68-88d7-445f-9834-b8b37ce90619",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1740,
260
],
"parameters": {
"color": 7,
"width": 519.1145893777881,
"height": 190.5042226526524,
"content": "## 3.2: Fetch Last Email Correspondance\n[Learn more about Gmail node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail)\n\nFetching our attendee's last email will definitely help the user \"pick up\" from when they last last off. To do this, we'll assume a Gmail user and use the Gmail node to filter messages by the attendee's email address."
},
"typeVersion": 1
},
{
"id": "fe1c751c-4879-482b-bb6f-89df23e1faa8",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1740,
860
],
"parameters": {
"color": 7,
"width": 667.8619481635637,
"height": 259.7914017217902,
"content": "## 3.4 Scraping LinkedIn With [Apify.com](https://www.apify.com?fpr=414q6)\n[Learn more about Apify.com for Web Scraping](https://www.apify.com?fpr=414q6)\n\nTo get the attendee's recent LinkedIn activity, we'll need a webscraper capable of rendering the user's LinkedIn profile. We'll use [Apify.com](https://www.apify.com?fpr=414q6) which is a commercial web scraping service but has a very generous monthly free tier ($5/mo).\n\nWhile Apify offers a number of dedicated LinkedIn scrapers, we'll build our own which works by impersonating our own LinkedIn account using our login cookie - this can be obtained by inspecting network requests when logged into Linkedin. **Add your LinkedIn Cookie to the node below!**"
},
"typeVersion": 1
},
{
"id": "a648cf7d-b859-4fec-8ae7-6450c70e6333",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
920,
310
],
"parameters": {
"color": 7,
"width": 572.0305871208889,
"height": 231.49547088049098,
"content": "## 3.1 Attendee Researcher SubWorkflow\n[Learn more about using Execute Workflow Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflowtrigger/)\n\nThe Attendee Researcher SubWorkflow's aims to collect and summarize both an attendee's last correspondance with the user (if applicable) and the attendee's LinkedIn profile (if available). It uses the router pattern to handle both branches allowing for shorter execution chains. Using the Switch node, this subworkflow is either triggered to fetch emails or scrape LinkedIn but never both simultaneously."
},
"typeVersion": 1
},
{
"id": "8a8dbe4f-86b1-41a4-9b7e-3affdee8e524",
"name": "Return LinkedIn Success",
"type": "n8n-nodes-base.set",
"position": [
4360,
1180
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "fc4b63a7-ad4d-49ff-9d42-715760910f6a",
"name": "linkedin_summary",
"type": "string",
"value": "={{ $json.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "537a399b-1f78-440b-abc4-ad2e91c5950a",
"name": "Return LinkedIn Error",
"type": "n8n-nodes-base.set",
"position": [
2380,
1320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bf5a0781-3bad-4f63-a49c-273b03204747",
"name": "linkedin_summary",
"type": "string",
"value": "No activities found."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "a68e7df7-8467-46e2-8ea8-fcf270755d12",
"name": "Return Email Error",
"type": "n8n-nodes-base.set",
"position": [
2080,
680
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9a7efc9e-26b0-48c9-83aa-ae989f20b1df",
"name": "email_summary",
"type": "string",
"value": "No correspondance found."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "00df2b18-22ca-48d6-b053-12fe502effc5",
"name": "Return Email Success",
"type": "n8n-nodes-base.set",
"position": [
2800,
500
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "fc4b63a7-ad4d-49ff-9d42-715760910f6a",
"name": "email_summary",
"type": "object",
"value": "={{ $json.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "cdae9f9f-11c0-4f26-9ba1-5d5ed279ebfc",
"name": "Set Route Email",
"type": "n8n-nodes-base.set",
"position": [
1600,
-260
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{ Object.assign({ \"route\": \"email\" }, $json) }}"
},
"typeVersion": 3.4
},
{
"id": "b01371f6-8871-4ad9-866d-888e22e7908e",
"name": "Set Route Linkedin",
"type": "n8n-nodes-base.set",
"position": [
1600,
-100
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{ Object.assign({ \"route\": \"linkedin\" }, $json) }}"
},
"typeVersion": 3.4
},
{
"id": "c4907171-b239-46a6-a0b0-6bf66570005f",
"name": "Router",
"type": "n8n-nodes-base.switch",
"position": [
1100,
580
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "email",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.route }}",
"rightValue": "email"
}
]
},
"renameOutput": true
},
{
"outputKey": "linkedin",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ba71a258-de67-4f61-a24a-33c86bd4c4f5",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.route }}",
"rightValue": "linkedin"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "45554355-57ad-464d-b768-5b00d707fc58",
"name": "Return LinkedIn Error1",
"type": "n8n-nodes-base.set",
"position": [
1440,
870
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "bf5a0781-3bad-4f63-a49c-273b03204747",
"name": "linkedin_summary",
"type": "string",
"value": "No activities found."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "05b04c17-eeeb-42f2-8d94-bc848889f17c",
"name": "Has Emails?",
"type": "n8n-nodes-base.if",
"position": [
1900,
500
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ff11640a-33e4-4695-a62c-7dcab57f0ae5",
"operator": {
"type": "object",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "c24aca66-6222-46ae-bb9b-1838b01f3100",
"name": "Return Email Error1",
"type": "n8n-nodes-base.set",
"position": [
1440,
700
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9a7efc9e-26b0-48c9-83aa-ae989f20b1df",
"name": "email_summary",
"type": "string",
"value": "No correspondance found."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "22f3ccbf-19a2-4ca5-ba23-f91963b52c0a",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
2560,
920
],
"parameters": {
"color": 7,
"width": 682.7350931085596,
"height": 219.59936012669806,
"content": "## 3.5: Extract LinkedIn Profile & Recent Activity\n[Learn more about the HTML node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.html)\n\nOnce we have our scraped LinkedIn profile, it's just a simple case of parsing and extracting the relevant sections from the page.\nFor the purpose of our workflow, we'll only need the \"About\" and \"Activity\" sections which we'll pull out of the page using a series of HTML nodes. Feel free to extract other sections to suit your needs! Once extracted, we'll combine the about and activities data in preparation of sending it to our LLM."
},
"typeVersion": 1
},
{
"id": "49b1fc8f-1259-4596-84b0-b37fae1c098c",
"name": "Sections To List",
"type": "n8n-nodes-base.splitOut",
"position": [
2720,
1180
],
"parameters": {
"options": {
"destinationFieldName": "data"
},
"fieldToSplitOut": "sections"
},
"typeVersion": 1
},
{
"id": "875b278d-44c6-4315-87e3-459a90799a9b",
"name": "Set LinkedIn Cookie",
"type": "n8n-nodes-base.set",
"position": [
1800,
1180
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "b4354c00-cc1a-4a55-8b44-6ba4854cc6ba",
"name": "linkedin_profile_url",
"type": "string",
"value": "={{ $json.linkedin_url }}"
},
{
"id": "4888db89-2573-4246-8ab9-c106a7fe5f38",
"name": "linkedin_cookies",
"type": "string",
"value": "<COPY_YOUR_LINKEDIN_COOKIES_HERE>"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "91da49ab-86a1-4539-b673-106b9edaeae9",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1400,
1240
],
"parameters": {
"color": 3,
"width": 308.16846950517856,
"height": 110.18457997698513,
"content": "### Be aware of LinkedIn T&Cs!\nFor production, you may want to consider not using your main Linkedin account if you can help it!"
},
"typeVersion": 1
},
{
"id": "7abd390f-36a6-49af-b190-5bb720bd2ae8",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
1740,
1152
],
"parameters": {
"width": 209.84856156501735,
"height": 301.5806674338321,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n### 🚨 Input Required!\nYou need to add your cuurent linkedIn Cookies here to continue."
},
"typeVersion": 1
},
{
"id": "40dfb438-76c2-40b5-8945-94dcf7cafcf7",
"name": "Attendees to List",
"type": "n8n-nodes-base.splitOut",
"position": [
1260,
-180
],
"parameters": {
"options": {},
"fieldToSplitOut": "output.attendees"
},
"typeVersion": 1
},
{
"id": "cc7f8416-6ea1-4425-a320-3f8217d2ad4e",
"name": "Merge Attendee with Summaries",
"type": "n8n-nodes-base.set",
"position": [
2160,
-180
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{ Object.assign({}, $('Attendees to List').item.json, $json) }}"
},
"typeVersion": 3.4
},
{
"id": "459c5f2b-5dd5-491f-8bed-475ae5af7ac0",
"name": "Has Email Address?",
"type": "n8n-nodes-base.if",
"position": [
1280,
580
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "1382e335-bfae-4665-a2ee-a05496a7b463",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.email }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "610e9849-f06c-4534-a269-d1982dcab259",
"name": "Has LinkedIn URL?",
"type": "n8n-nodes-base.if",
"position": [
1280,
750
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "1382e335-bfae-4665-a2ee-a05496a7b463",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.linkedin_url }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "43e5192e-c1b0-4d71-8d0e-aa466aa9930c",
"name": "Get Correspondance",
"type": "n8n-nodes-base.executeWorkflow",
"onError": "continueRegularOutput",
"position": [
1780,
-260
],
"parameters": {
"mode": "each",
"options": {
"waitForSubWorkflow": true
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
}
},
"typeVersion": 1.1
},
{
"id": "4662f928-d38b-42e1-8a70-5676eb638ce1",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
2000,
-180
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3
},
{
"id": "3eaf5d5b-d99c-4f9f-beaa-53b859bf482e",
"name": "Aggregate Attendees",
"type": "n8n-nodes-base.aggregate",
"position": [
2340,
-180
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData",
"destinationFieldName": "attendees"
},
"typeVersion": 1
},
{
"id": "752afdd3-0561-4e53-8b18-391741a2f43b",
"name": "Activities To Array",
"type": "n8n-nodes-base.aggregate",
"position": [
3680,
1360
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData",
"destinationFieldName": "activity"
},
"typeVersion": 1
},
{
"id": "a35dc751-62a0-4f5c-92cb-2801d060c613",
"name": "Extract Profile Metadata",
"type": "n8n-nodes-base.html",
"position": [
2560,
1180
],
"parameters": {
"options": {},
"operation": "extractHtmlContent",
"dataPropertyName": "body",
"extractionValues": {
"values": [
{
"key": "name",
"cssSelector": "h1"
},
{
"key": "tagline",
"cssSelector": ".pv-text-details__left-panel--full-width .text-body-medium"
},
{
"key": "location",
"cssSelector": ".pv-text-details__left-panel--full-width + div .text-body-small"
},
{
"key": "num_connections",
"cssSelector": "a[href=\"/mynetwork/invite-connect/connections/\"]"
},
{
"key": "num_followers",
"cssSelector": "a[href=\"https://www.linkedin.com/feed/followers/\"]"
},
{
"key": "sections",
"cssSelector": "section[data-view-name]",
"returnArray": true,
"returnValue": "html"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "5685ec9f-c219-41b4-94d7-787daef8a628",
"name": "Activities To List",
"type": "n8n-nodes-base.splitOut",
"position": [
3360,
1360
],
"parameters": {
"options": {},
"fieldToSplitOut": "activity"
},
"typeVersion": 1
},
{
"id": "71240827-3e0d-4276-afb0-9ed72878ea4c",
"name": "APIFY Web Scraper",
"type": "n8n-nodes-base.httpRequest",
"position": [
2000,
1180