Modèle - Obtenir des notifications quotidiennes de prospects (ProspectPro)
Ceci est unLead Generation, Multimodal AIworkflow d'automatisation du domainecontenant 22 nœuds.Utilise principalement des nœuds comme If, Code, Gmail, ScheduleTrigger, Prospectpro. Suivi des prospects B2B : résumé quotidien des visiteurs de site avec ProspectPro et Gmail
- •Compte Google et informations d'identification Gmail API
Nœuds utilisés (22)
Catégorie
{
"id": "wsu2umJyLSwBPvdA",
"meta": {
"instanceId": "04f23e4c433f478fbd7cc8c4ceff447b7061f1e9f3641a5ebf456657ac823807",
"templateCredsSetupCompleted": true
},
"name": "Template - Get Daily Prospects Notification (ProspectPro)",
"tags": [],
"nodes": [
{
"id": "87d718ee-2815-4598-a782-e0377dc5095c",
"name": "Définir l'heure du filtre",
"type": "n8n-nodes-base.code",
"position": [
112,
-48
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Get timestamp from previous node\nconst ts = new Date($json[\"timestamp\"]);\n\n// Subtract one day\nts.setDate(ts.getDate() - 1);\n\n// Round down to the hour\nts.setMinutes(0, 0, 0);\n\nreturn {\n original: $json[\"timestamp\"],\n minusOneDayRoundedHour: ts.toISOString(),\n};\n"
},
"typeVersion": 2
},
{
"id": "440986e2-fa17-450b-84ba-6a1d67875ffe",
"name": "Obtenir les prospects",
"type": "@bedrijfsdatanl/n8n-nodes-prospectpro.prospectpro",
"onError": "continueErrorOutput",
"position": [
352,
-48
],
"parameters": {
"details": true,
"filterOptions": {
"total_visits": "666",
"from_changed_time": "={{ $json.minusOneDayRoundedHour }}"
},
"requestOptions": {},
"sortingOptions": {
"sort_by": "changed_time",
"sort_order": "desc"
},
"paginationOptions": {}
},
"credentials": {
"prospectproApi": {
"id": "shwXaWuycdB4BMQa",
"name": "ProspectPro account - PP"
}
},
"typeVersion": 1
},
{
"id": "4559b076-c8ab-46d6-b4ba-0ea6aae3a495",
"name": "Sélectionner les prospects",
"type": "n8n-nodes-base.code",
"position": [
592,
-48
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// cutoff time from previous node\nconst cutoff = new Date($('Set Filter Time').item.json.minusOneDayRoundedHour).getTime() / 1000;\n\n// take prospects from the API response\nconst prospects = $json[\"companies\"] || [];\n\n// filter: only keep prospects with visits after cutoff and remove disqualified prospects\nconst visited = prospects.filter(c => c.last_visit >= cutoff && c.label !== 0);\n\n// return one item per company\nreturn {\n total: visited.length,\n prospects: visited\n};"
},
"typeVersion": 2
},
{
"id": "b90e8b83-98b3-4d7e-adc5-ddb45dd19fa2",
"name": "Y a-t-il des prospects ?",
"type": "n8n-nodes-base.if",
"position": [
832,
-48
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "031dab60-52a5-486c-a266-3a986dc7b9f3",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.total }}",
"rightValue": 0
}
]
}
},
"typeVersion": 2.2
},
{
"id": "e56eaccd-3c77-45e6-8dc3-ba9d921c6fd8",
"name": "Créer une liste de prospects",
"type": "n8n-nodes-base.code",
"position": [
1072,
-48
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const prospects = $json.prospects || [];\n\n// Separate label === 1 first\nconst hot = prospects.filter(p => p.label === 1);\nconst rest = prospects.filter(p => p.label !== 1);\n\nconst sortedProspects = hot.concat(rest);\nconst limitedProspects = sortedProspects.slice(0, 20);\n\n// Build message\nconst lines = [];\n\nif (limitedProspects.length) {\n limitedProspects.forEach(p => {\n const name = `<b>${p.name}</b>`;\n const label = p.label === 1 ? ' (Gekwalificeerd)' : p.city ? `(${p.city}${!!p.country_code && p.country_code !== 'NL' ? `, ${p.country_code}` : '' })` : '';\n const url = !!p.url && !!p.domain ? `<a href=\"${p.url}\" target=\"_blank\">${p.domain}</a>` : !!p.domain ? `<a href=\"${p.domain}\" target=\"_blank\">${p.domain}</a>` : '';\n const tags = p.tags ? p.tags.split('|').join(\", \") : '';\n\n lines.push(name + (label ? ' ' + label : ''));\n lines.push(url + (url && tags ? ' - ' : '') + tags);\n lines.push(`<i>Aantal bezoeken: ${p.total_visits}. Bezochte pagina's: ${p.pageviews}</i>`);\n \n lines.push(\"\");\n });\n}\n\nconst message = lines.join(\"<br>\");\n\nreturn { message };\n"
},
"typeVersion": 2
},
{
"id": "d569ca35-3e5f-4695-9272-ea604b01ac04",
"name": "Aucun prospect, pas d'email",
"type": "n8n-nodes-base.noOp",
"position": [
1552,
352
],
"parameters": {},
"typeVersion": 1
},
{
"id": "f6ea9470-3801-4b16-afa4-fd6f1a18332b",
"name": "Erreur : ProspectPro",
"type": "n8n-nodes-base.noOp",
"position": [
1552,
800
],
"parameters": {},
"typeVersion": 1
},
{
"id": "931d0e27-3ac3-4164-9b7f-5dc086d97b40",
"name": "Erreur : Gmail",
"type": "n8n-nodes-base.noOp",
"position": [
1552,
992
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d1527b38-dc02-437a-a93c-eca2e8af2066",
"name": "Envoyer la notification",
"type": "n8n-nodes-base.gmail",
"onError": "continueErrorOutput",
"position": [
1312,
-48
],
"webhookId": "af3327c4-18c8-4ab2-bb03-ae9da77f04fd",
"parameters": {
"message": "=Goedemorgen!<br><br>In de afgelopen 24 uur hebben <b>{{ $('Has Prospects?').item.json.total }} prospects</b> jouw website bezocht. {{ $('Has Prospects?').item.json.total > 20 ? \"Dit zijn de 20 belangrijkste.\" : '' }}<br><br>\n\n{{ $json.message }}\n\n<br><br><a href=\"https://mijn.prospectpro.nl\" target=\"_blank\">Bekijk alle prospects in ProspectPro.</a>",
"options": {
"appendAttribution": false
},
"subject": "=ProspectPro: {{ $('Has Prospects?').item.json.total }} prospects hebben je website bezocht"
},
"credentials": {
"gmailOAuth2": {
"id": "LPM6gSqbUwI9Clmn",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "167a0dbb-b5e0-42bf-b6ca-c17f844c2963",
"name": "Note adhésive7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1488,
560
],
"parameters": {
"color": 3,
"width": 224,
"height": 624,
"content": "## Error handling\nPlease always handle potential errors properly.\n\n**For example**: log in Google Sheet, send Slack/Telegram/email notification."
},
"typeVersion": 1
},
{
"id": "17d67b78-8e99-438b-8bc6-6ab8f88aa2b2",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
1488,
160
],
"parameters": {
"color": 2,
"width": 224,
"height": 384,
"content": "## No Results\nCancel workflow when there isn't any activity to report."
},
"typeVersion": 1
},
{
"id": "0b9e9258-f39b-4cb6-a63a-1a6a53d2cd12",
"name": "Note adhésive9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1216,
-240
],
"parameters": {
"width": 896,
"height": 704,
"content": "## Template: Send ProspectPro notifications\nThis workflow collects all prospects that have visited your website in the last 24 hours, and wraps it up in a daily email notification.\n\n*Important:* This workflow contains extra steps to enable granular control and ensure optimal customisability. \n\nProspectPro: https://mijn.prospectpro.nl\nProspectPro API docs: https://docs.prospectpro.nl\n\n### Example notification:\n\n\n**Please note** this is merely example data, there's much, much more available."
},
"typeVersion": 1
},
{
"id": "e246ccd6-bb7f-4fc6-b033-3bd42273b42c",
"name": "Note adhésive10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-192,
-240
],
"parameters": {
"width": 224,
"height": 384,
"content": "## Trigger: Daily\nWorkflow executes daily at 07:50."
},
"typeVersion": 1
},
{
"id": "6fc153df-c3b5-4bf2-9a7a-0b3a081ca9da",
"name": "Quotidien, 07:50",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-128,
-48
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 7,
"triggerAtMinute": 50
}
]
}
},
"typeVersion": 1.2
},
{
"id": "21d82f5f-e1d7-44fc-a39d-e19a33bb5fee",
"name": "Note adhésive11",
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
-240
],
"parameters": {
"color": 6,
"width": 224,
"height": 384,
"content": "## Set Filter Time\nSimple code for daily notifications. Adjust when changing your execution interval. "
},
"typeVersion": 1
},
{
"id": "e4503162-05b9-483f-9478-c4166f6471fa",
"name": "Note adhésive12",
"type": "n8n-nodes-base.stickyNote",
"position": [
288,
-240
],
"parameters": {
"color": 5,
"width": 224,
"height": 384,
"content": "## Get Prospects\nGet all prospects that have been modified in the last 24 hours."
},
"typeVersion": 1
},
{
"id": "080fc58b-065a-45a8-8ffd-0069c1a81018",
"name": "Note adhésive13",
"type": "n8n-nodes-base.stickyNote",
"position": [
528,
-240
],
"parameters": {
"color": 6,
"width": 224,
"height": 384,
"content": "## Filter Prospects\nRemove disqualified prospects and prospects that haven't visited your website in the last 24 hours."
},
"typeVersion": 1
},
{
"id": "b874fbbb-721c-46cc-bc49-cb9ff1258850",
"name": "Note adhésive14",
"type": "n8n-nodes-base.stickyNote",
"position": [
768,
-240
],
"parameters": {
"color": 2,
"width": 224,
"height": 384,
"content": "## Check Results\nCheck if there are any prospects to report."
},
"typeVersion": 1
},
{
"id": "51c294be-9422-416e-8ca2-f52921b558c4",
"name": "Note adhésive15",
"type": "n8n-nodes-base.stickyNote",
"position": [
1008,
-240
],
"parameters": {
"color": 6,
"width": 224,
"height": 384,
"content": "## Prospect List\nDefine what prospect data you want to include in your email notification."
},
"typeVersion": 1
},
{
"id": "c32792e4-b4cf-4347-a264-d470ada67d6f",
"name": "Notification",
"type": "n8n-nodes-base.stickyNote",
"position": [
1248,
-240
],
"parameters": {
"color": 5,
"width": 224,
"height": 384,
"content": "## Notification\nConfigure and compose your notification."
},
"typeVersion": 1
},
{
"id": "b7c748b7-be60-4346-a92d-669f0bd20a1b",
"name": "Terminé",
"type": "n8n-nodes-base.noOp",
"position": [
1552,
-48
],
"parameters": {},
"typeVersion": 1
},
{
"id": "01b2a038-0160-4416-ad7b-cee00b8b3e12",
"name": "Notification1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1488,
-240
],
"parameters": {
"color": 4,
"width": 224,
"height": 384,
"content": "## Workflow Completed\nOptionally add following steps, like logging."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "180151cc-dc89-42eb-95ce-e9d6400e04ce",
"connections": {
"6fc153df-c3b5-4bf2-9a7a-0b3a081ca9da": {
"main": [
[
{
"node": "87d718ee-2815-4598-a782-e0377dc5095c",
"type": "main",
"index": 0
}
]
]
},
"440986e2-fa17-450b-84ba-6a1d67875ffe": {
"main": [
[
{
"node": "4559b076-c8ab-46d6-b4ba-0ea6aae3a495",
"type": "main",
"index": 0
}
],
[
{
"node": "f6ea9470-3801-4b16-afa4-fd6f1a18332b",
"type": "main",
"index": 0
}
]
]
},
"b90e8b83-98b3-4d7e-adc5-ddb45dd19fa2": {
"main": [
[
{
"node": "e56eaccd-3c77-45e6-8dc3-ba9d921c6fd8",
"type": "main",
"index": 0
}
],
[
{
"node": "d569ca35-3e5f-4695-9272-ea604b01ac04",
"type": "main",
"index": 0
}
]
]
},
"87d718ee-2815-4598-a782-e0377dc5095c": {
"main": [
[
{
"node": "440986e2-fa17-450b-84ba-6a1d67875ffe",
"type": "main",
"index": 0
}
]
]
},
"4559b076-c8ab-46d6-b4ba-0ea6aae3a495": {
"main": [
[
{
"node": "b90e8b83-98b3-4d7e-adc5-ddb45dd19fa2",
"type": "main",
"index": 0
}
]
]
},
"d1527b38-dc02-437a-a93c-eca2e8af2066": {
"main": [
[
{
"node": "b7c748b7-be60-4346-a92d-669f0bd20a1b",
"type": "main",
"index": 0
}
],
[
{
"node": "931d0e27-3ac3-4164-9b7f-5dc086d97b40",
"type": "main",
"index": 0
}
]
]
},
"e56eaccd-3c77-45e6-8dc3-ba9d921c6fd8": {
"main": [
[
{
"node": "d1527b38-dc02-437a-a93c-eca2e8af2066",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé - Génération de leads, IA Multimodale
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Olivier
@olivier-nlPartager ce workflow