Automatisation de l'intégration d'utilisateurs de la base de données vers Saleshandy
Ceci est unLead Nurturingworkflow d'automatisation du domainecontenant 16 nœuds.Utilise principalement des nœuds comme Code, HttpRequest, GoogleSheets, ManualTrigger. Suivi de l'intégration des utilisateurs de la base de données vers Saleshandy via Google Sheets
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
- •Informations d'identification Google Sheets API
Nœuds utilisés (16)
Catégorie
{
"meta": {
"instanceId": "5f48daf3a0baf541941ac99dac87a58469ec38ada0698ec3f47e71ef7e50b0ff"
},
"nodes": [
{
"id": "9c9c4619-6e83-4a31-b783-c1250540b6ff",
"name": "Obtenir les dates d'hier",
"type": "n8n-nodes-base.code",
"position": [
380,
480
],
"parameters": {
"jsCode": "function formatToSupabaseTimestamp(date) {\n const iso = date.toISOString();\n const [datePart, ms = \"000\"] = iso.split('.')[1]?.split('Z') || [\"000\"];\n const paddedMicro = (ms + \"000000\").slice(0, 6);\n return iso.replace(/\\.\\d+Z/, `.${paddedMicro}+00:00`);\n}\n\nconst now = new Date();\n\nconst yesterday = new Date(now);\nyesterday.setDate(now.getDate() - 1);\nyesterday.setHours(0, 0, 0, 0);\n\nconst start = new Date(yesterday);\nconst end = new Date(yesterday);\nend.setHours(23, 59, 59, 999);\n\nreturn [\n {\n json: {\n isoStart: formatToSupabaseTimestamp(start),\n isoEnd: formatToSupabaseTimestamp(end)\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "381fac0c-25bc-4322-980d-009012378923",
"name": "Note adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
660,
320
],
"parameters": {
"width": 360,
"height": 340,
"content": "## Fetch All Users\nThis step fetches all users from your database and filters them based on the selected date range (e.g., yesterday, last 7 days, etc.)."
},
"typeVersion": 1
},
{
"id": "d216b2d6-ae67-451f-923d-5bd07f847b00",
"name": "Ajouter une ligne pour semi-qualifiés",
"type": "n8n-nodes-base.googleSheets",
"position": [
1560,
120
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('Date Filtered Users').item.json.id }}",
"Name ": "={{ $('Date Filtered Users').item.json.first_name }}",
"Email ": "={{ $('Date Filtered Users').item.json.email }}",
"created_at": "={{ $('Date Filtered Users').item.json.created_at}}"
},
"schema": [
{
"id": "ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Name ",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Name ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email ",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Email ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "created_at",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "created_at",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "payload",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "payload",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZfV7CLtXKzNtiQcF_9XgHUwyVn467hpYrwFaQ3Hfhmc/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ZfV7CLtXKzNtiQcF_9XgHUwyVn467hpYrwFaQ3Hfhmc",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZfV7CLtXKzNtiQcF_9XgHUwyVn467hpYrwFaQ3Hfhmc/edit?usp=drivesdk",
"cachedResultName": "database fetch "
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "RWziWEBHK0Fgyt1r",
"name": "Google Sheets account 5"
}
},
"typeVersion": 4.6
},
{
"id": "dbb1cba5-658e-4065-b8d7-5d7dc0d994aa",
"name": "Récupérer tous les utilisateurs de la base de données",
"type": "n8n-nodes-base.httpRequest",
"position": [
680,
120
],
"parameters": {
"url": "ADD YOUR DATABASE URL",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "ADD YOUR DATABASE ANON KEY"
},
{
"name": "Authorization",
"value": "ADD YOUR SERVICE ROLE KEY (ADD bearer BEFORE SR KEY)"
}
]
}
},
"typeVersion": 4
},
{
"id": "1281e124-bf06-4dae-a232-2142d566fb20",
"name": "Utilisateurs filtrés par date",
"type": "n8n-nodes-base.code",
"position": [
880,
120
],
"parameters": {
"jsCode": "const isoStart = $items(\"Get yesterday dates\")[0].json.isoStart;\nconst isoEnd = $items(\"Get yesterday dates\")[0].json.isoEnd;\n\nreturn items\n .filter(item => {\n const createdAt = new Date(item.json.created_at);\n const start = new Date(isoStart);\n const end = new Date(isoEnd);\n return createdAt >= start && createdAt <= end;\n })\n .map(item => {\n const [first_name, ...rest] = item.json.full_name.split(' ');\n const last_name = rest.join(' ') || '';\n return {\n json: {\n id: item.json.id,\n first_name: first_name,\n last_name: last_name,\n email: item.json.email,\n created_at: item.json.created_at\n }\n };\n });\n"
},
"typeVersion": 2
},
{
"id": "f54a17c0-b64c-4da7-b9d6-4e52768db0a9",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
0
],
"parameters": {
"color": 7,
"width": 1820,
"height": 700,
"content": "## **OnboardTrigger: Signup to Saleshandy Sequence**\nAutomatically connects your new application signups from the database to a targeted Saleshandy email sequence. This ensures every new user receives timely, personalized outreach, whether it’s for onboarding, nudging them to purchase a plan, or sharing any custom message. "
},
"typeVersion": 1
},
{
"id": "79afa502-655d-4431-8fca-f32ec7abdb51",
"name": "Note adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
20,
280
],
"parameters": {
"height": 320,
"content": "## Trigger this workflow to reach every new signup —> daily.\n\nMake it part of your everyday routine to automatically fetch leads from your app, add them to a Saleshandy sequence, and send timely emails to engage, nurture, and encourage them to become paying customers"
},
"typeVersion": 1
},
{
"id": "266fdde0-d952-4a11-bc7f-8bc52b5845ec",
"name": "Déclencheur quotidien",
"type": "n8n-nodes-base.manualTrigger",
"position": [
100,
120
],
"parameters": {},
"typeVersion": 1
},
{
"id": "4b47add8-1967-4769-a355-58b88151d147",
"name": "Ajouter une nouvelle inscription à la séquence Saleshandy",
"type": "n8n-nodes-base.httpRequest",
"position": [
1200,
520
],
"parameters": {
"url": "https://open-api.saleshandy.com/v1/sequences/prospects/import-with-field-name",
"method": "POST",
"options": {},
"jsonBody": "={\n \"prospectList\": [\n {\n \"First Name\": \"{{ $json['first_name']}}\",\n \"Email\": \"{{ $json['email']}}\"\n }\n ],\n \"stepId\": \"ADD YOUR SALESHANDY SEQUENCE ID\",\n \"verifyProspects\": false,\n \"conflictAction\": \"overwrite\"\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "ADD YOUR SALESHANDY API KEY"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "dae2032f-b0f1-4d41-ad01-d01748e12fad",
"name": "Note adhésive3",
"type": "n8n-nodes-base.stickyNote",
"position": [
320,
120
],
"parameters": {
"height": 200,
"content": "## Date Generator\nGenerates **yesterday’s date** for filtering signups in the next steps.\n\n**Note:** You can update this to any range; day, week, or month, as needed."
},
"typeVersion": 1
},
{
"id": "06b5b4d0-a5cb-4fd8-84b2-5462a91d70bd",
"name": "Note adhésive5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1100,
100
],
"parameters": {
"width": 320,
"height": 400,
"content": "## Connect to Saleshandy's Sequence \nThis step connects to your Saleshandy sequence, allowing you to automatically send customized emails to your new users as part of your outreach flow."
},
"typeVersion": 1
},
{
"id": "76700793-0958-495d-8d6d-d4d2b98bd976",
"name": "Note adhésive4",
"type": "n8n-nodes-base.stickyNote",
"position": [
680,
440
],
"parameters": {
"color": 3,
"width": 320,
"height": 200,
"content": "## What you need to update:\nMake sure to update the node with your actual:\n**Database URL**\n**Public Anon Key**\n**Service Role Key**\nThese are required to authenticate and query your database correctly."
},
"typeVersion": 1
},
{
"id": "a10100f0-5c60-4320-bcb7-b07dfd7fb153",
"name": "Note adhésive6",
"type": "n8n-nodes-base.stickyNote",
"position": [
340,
340
],
"parameters": {
"color": 3,
"width": 180,
"height": 80,
"content": "by default Yesterday's date is set"
},
"typeVersion": 1
},
{
"id": "c7b44a55-ec88-4ba3-94b5-dcbd5be785ba",
"name": "Note adhésive7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
280
],
"parameters": {
"color": 3,
"width": 280,
"height": 200,
"content": "## What you need to update:\nAdd the following values to this node for it to work correctly:\n**Saleshandy API Key**\n**Your Sequence ID** (retrieved from your Saleshandy sequence)"
},
"typeVersion": 1
},
{
"id": "a7dec1af-92fb-4a1b-8576-8fedb3fe5fdf",
"name": "Note adhésive8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1480,
300
],
"parameters": {
"width": 320,
"height": 340,
"content": "## Append to Google Sheets\nThis step appends your latest user data to a selected Google Sheet for tracking, analysis, or backup."
},
"typeVersion": 1
},
{
"id": "21032964-c416-4a79-8169-b1ae8a437b51",
"name": "Note adhésive9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1500,
420
],
"parameters": {
"color": 3,
"width": 280,
"height": 200,
"content": "## What you need to update:\nConnect your Google Sheets account\n**Select the target sheet**\nEnsure the sheet has the following columns:\n**ID, Name, Email, Created_at**"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"266fdde0-d952-4a11-bc7f-8bc52b5845ec": {
"main": [
[
{
"node": "9c9c4619-6e83-4a31-b783-c1250540b6ff",
"type": "main",
"index": 0
}
]
]
},
"1281e124-bf06-4dae-a232-2142d566fb20": {
"main": [
[
{
"node": "4b47add8-1967-4769-a355-58b88151d147",
"type": "main",
"index": 0
}
]
]
},
"9c9c4619-6e83-4a31-b783-c1250540b6ff": {
"main": [
[
{
"node": "dbb1cba5-658e-4065-b8d7-5d7dc0d994aa",
"type": "main",
"index": 0
}
]
]
},
"dbb1cba5-658e-4065-b8d7-5d7dc0d994aa": {
"main": [
[
{
"node": "1281e124-bf06-4dae-a232-2142d566fb20",
"type": "main",
"index": 0
}
]
]
},
"4b47add8-1967-4769-a355-58b88151d147": {
"main": [
[
{
"node": "d216b2d6-ae67-451f-923d-5bd07f847b00",
"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é - Nurturing de leads
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
Dhruv from Saleshandy
@saleshandyPartager ce workflow