Message direct automatisé aux prospects "aimant"

Avancé

Ceci est unLead Nurturing, Multimodal AIworkflow d'automatisation du domainecontenant 32 nœuds.Utilise principalement des nœuds comme If, Code, Wait, Merge, Filter. Génération de prospects LinkedIn : système de messages directs automatisés déclenchés par les commentaires (Unipile & NocoDB)

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "adTN1ACEd55SvrfK",
  "meta": {
    "instanceId": "eb3cc320bca8046d48c5a85268d37732357adb476937d06e2fa23aaf467734b3"
  },
  "name": "Linkedin auto DM lead magnets",
  "tags": [
    {
      "id": "OQdJLEK7VqrdC9KA",
      "name": "demo",
      "createdAt": "2025-08-25T07:58:37.417Z",
      "updatedAt": "2025-08-25T07:58:37.417Z"
    },
    {
      "id": "Wl29p3uvKetfAt56",
      "name": "unipile",
      "createdAt": "2025-08-23T07:33:47.777Z",
      "updatedAt": "2025-08-23T07:33:47.777Z"
    },
    {
      "id": "XjGKhiynMBVXcm5s",
      "name": "linkedin",
      "createdAt": "2025-08-23T07:33:44.951Z",
      "updatedAt": "2025-08-23T07:33:44.951Z"
    }
  ],
  "nodes": [
    {
      "id": "406b0a33-714a-4ad3-acef-434feb3de2c4",
      "name": "Obtenir les commentaires des publications",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2256,
        288
      ],
      "parameters": {
        "url": "={{$vars.unipileroot}}/posts/\nurn:li:activity:{{ $('On form submission').first().json[\"Post ID\"] }}/comments",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "account_id",
              "value": "={{ $vars.unipile_linkedin }}"
            },
            {
              "name": "={{$json.cursor? \"cursor\": \"\"}}",
              "value": "={{ $json.cursor }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "G4UvXLOwS5RV6x4O",
          "name": "UNIPILE"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e98b0d3a-8ad1-4473-8d38-c447b48d6570",
      "name": "Diviser Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -2032,
        288
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "items"
      },
      "typeVersion": 1
    },
    {
      "id": "a2ad6646-25c5-4774-9e5b-f1ee4a0f58e4",
      "name": "Vérifier si nous sommes connectés",
      "type": "n8n-nodes-base.if",
      "position": [
        -1584,
        288
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c66c00d6-cf3a-4ca7-ac99-d68953fdc942",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.author_details.network_distance }}",
              "rightValue": "DISTANCE_1"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "65900582-c07f-410e-9f5b-10d111b7c2ba",
      "name": "Filtrer les commentaires avec déclencheur",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1808,
        288
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "365ec4b2-3a65-4c01-9382-6fb3ec209678",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.text.toLowerCase() }}",
              "rightValue": "={{ $('On form submission').first().json[\"Trigger word\"] }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7177bfc0-b56c-4521-959e-501268b361fe",
      "name": "Envoyer un MP avec l'aimant à leads",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        256,
        -512
      ],
      "parameters": {
        "url": "={{$vars.unipileroot}}/chats",
        "method": "POST",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": "={{ Math.floor(Math.random() * 4000) + 8000 }}"
            }
          }
        },
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "account_id",
              "value": "={{$vars.unipile_linkedin}}"
            },
            {
              "name": "attendees_ids",
              "value": "={{ $json.author_details.id }}"
            },
            {
              "name": "text",
              "value": "=Hey {{ $json.author.split(\" \")[0] }},\nThanks for jumping into the conversation on my post\nHere’s the workflow {{ $('On form submission').first().json[\"Lead Magnet Link\"] }} I mentioned:\n👉 \nCurious, what are you working on these days?\n\nAlexandra\n"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "G4UvXLOwS5RV6x4O",
          "name": "UNIPILE"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "0a6e88d7-3ed6-4af3-947a-bea5def22034",
      "name": "Répondre au commentaire",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        704,
        -512
      ],
      "parameters": {
        "url": "={{ $vars.unipileroot }}/posts/{{ $('Loop Over Items1').item.json.post_urn }}/comments",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "account_id",
              "value": "={{ $vars.unipile_linkedin }}"
            },
            {
              "name": "comment_id",
              "value": "={{ $('Loop Over Items1').item.json.id }}"
            },
            {
              "name": "text",
              "value": "={{ $json.reply_message }}"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "G4UvXLOwS5RV6x4O",
          "name": "UNIPILE"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "80749fe9-8b5e-4f5a-b719-7cae5eec114c",
      "name": "Créer une rotation de messages",
      "type": "n8n-nodes-base.code",
      "onError": "continueRegularOutput",
      "position": [
        480,
        -512
      ],
      "parameters": {
        "jsCode": "const messages = [\n  // Type 1: DM sent\n  \"DM sent! 📨\",\n  \"Check your DM! 💬\", \n  \"Message sent privately! ✨\",\n  \n  // Type 2: On the way  \n  \"Workflow on its way! 🚀\",\n  \"Sending now... 📤\",\n  \"Resource incoming! ⚡\",\n  \n  // Type 3: Simple confirmation\n  \"Done! 👍\",\n  \"Sent! ✅\", \n  \"Check your messages! 📩\"\n];\n\nconst messageIndex = ($runIndex || 0) % messages.length;\nconst selectedMessage = messages[messageIndex];\n\n\nreturn items.map(item => ({\n  ...item.json,\n  reply_message: selectedMessage,\n  message_index: messageIndex, // Pour debug\n  timestamp: new Date().toISOString()\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "10204b8f-33a2-46ad-b99c-5d8a4b5e0ed6",
      "name": "Créer une ligne",
      "type": "n8n-nodes-base.nocoDb",
      "onError": "continueRegularOutput",
      "position": [
        928,
        -368
      ],
      "parameters": {
        "table": "mjmgjsh2x620k0x",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldName": "linkedin_id",
              "fieldValue": "={{ $('Loop Over Items1').item.json.author_details.id }}"
            },
            {
              "fieldName": "headline",
              "fieldValue": "={{ $('Loop Over Items1').item.json.author_details.headline }}"
            },
            {
              "fieldName": "name",
              "fieldValue": "={{ $('Loop Over Items1').item.json.author }}"
            },
            {
              "fieldName": "date",
              "fieldValue": "={{$('Loop Over Items1').item.json.date?.toDateTime().format('yyyy-MM-dd') }}"
            },
            {
              "fieldName": "posts_id",
              "fieldValue": "={{ $('Loop Over Items1').item.json.post_id }}"
            },
            {
              "fieldName": "url",
              "fieldValue": "={{ $('Loop Over Items1').item.json.author_details.profile_url }}"
            },
            {
              "fieldName": "connection_status",
              "fieldValue": "={{ $('Loop Over Items1').item.json.author_details.network_distance }}"
            },
            {
              "fieldName": "dm_status",
              "fieldValue": "sent"
            }
          ]
        },
        "operation": "create",
        "projectId": "p2gtuxj1nvc3neq",
        "authentication": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "id": "XcfeXxqx8zD1546V",
          "name": "NocoDB Token account"
        }
      },
      "retryOnFail": true,
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "ad6c2ab6-e5c2-434d-964b-d45636084c91",
      "name": "Demander une connexion",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        -464,
        528
      ],
      "parameters": {
        "url": "={{ $vars.unipileroot }}/posts/{{ $json.post_urn }}/comments",
        "method": "POST",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 3000
            }
          }
        },
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "account_id",
              "value": "={{ $vars.unipile_linkedin }}"
            },
            {
              "name": "comment_id",
              "value": "={{ $json.id }}"
            },
            {
              "name": "text",
              "value": "=Please, send me a connection request first!"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "G4UvXLOwS5RV6x4O",
          "name": "UNIPILE"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "c59ecad0-b18d-44e6-bc79-9eb0fac6598c",
      "name": "Boucler sur les éléments1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -256,
        -112
      ],
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "typeVersion": 3
    },
    {
      "id": "3b2c3445-8ff2-4006-9008-4f23f52d1e36",
      "name": "Attendre",
      "type": "n8n-nodes-base.wait",
      "position": [
        32,
        -512
      ],
      "webhookId": "8027ff5d-44ea-45c0-8edb-600199d99527",
      "parameters": {
        "amount": "={{ Math.floor(Math.random() * 4) + 8 }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "6c3638b7-86bc-4d3f-9ad8-f4d87c4a1d8e",
      "name": "Diviser Out2",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -496,
        -112
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "filtered"
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "4a85ebfe-12d4-401d-8521-5e0ffd1dfaf1",
      "name": "curseur",
      "type": "n8n-nodes-base.code",
      "position": [
        -2480,
        288
      ],
      "parameters": {
        "jsCode": "let cursor =\"\"\ntry {\n\n cursor = $('Get Comments from Posts').first().json.cursor\n\n} catch (e) {\n  \n cursor = \"\";\n\n}\nreturn { cursor};"
      },
      "typeVersion": 2
    },
    {
      "id": "c3cdda9f-b21a-40ac-9193-b77f2535139b",
      "name": "Fusionner1",
      "type": "n8n-nodes-base.merge",
      "onError": "continueRegularOutput",
      "position": [
        0,
        0
      ],
      "parameters": {
        "mode": "chooseBranch"
      },
      "typeVersion": 3.2,
      "alwaysOutputData": true
    },
    {
      "id": "475b811e-d5b5-4ab9-abfb-cfbb025c9f2c",
      "name": "Filtrer1",
      "type": "n8n-nodes-base.filter",
      "position": [
        208,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "57115dce-3f94-405d-b657-11b14e67e770",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $('Get Comments from Posts').first().json.cursor }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ea3a1e71-262d-4439-9bae-77ebb8a25347",
      "name": "Créer une ligne2",
      "type": "n8n-nodes-base.nocoDb",
      "onError": "continueRegularOutput",
      "position": [
        -240,
        528
      ],
      "parameters": {
        "table": "mjmgjsh2x620k0x",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldName": "linkedin_id",
              "fieldValue": "={{ $('Split Out').item.json.author_details.id }}"
            },
            {
              "fieldName": "headline",
              "fieldValue": "={{ $('Split Out').item.json.author_details.headline }}"
            },
            {
              "fieldName": "name",
              "fieldValue": "={{ $('Split Out').item.json.author }}"
            },
            {
              "fieldName": "date",
              "fieldValue": "={{$('Split Out').item.json.date?.toDateTime().format('yyyy-MM-dd') }}"
            },
            {
              "fieldName": "posts_id",
              "fieldValue": "={{ $('Split Out').item.json.post_id }}"
            },
            {
              "fieldName": "url",
              "fieldValue": "={{ $('Split Out').item.json.author_details.profile_url }}"
            },
            {
              "fieldName": "connection_status",
              "fieldValue": "={{ $('Split Out').item.json.author_details.network_distance }}"
            },
            {
              "fieldName": "dm_status",
              "fieldValue": "connection request"
            }
          ]
        },
        "operation": "create",
        "projectId": "p2gtuxj1nvc3neq",
        "authentication": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "id": "XcfeXxqx8zD1546V",
          "name": "NocoDB Token account"
        }
      },
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "51b7817f-0901-4c22-b91d-b78243e498c2",
      "name": "À la soumission du formulaire",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -2784,
        288
      ],
      "webhookId": "518b05fa-05d6-4e52-bfc7-333bdda185f4",
      "parameters": {
        "options": {},
        "formTitle": "Linkedin Auto DM lead magnets",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Post ID",
              "requiredField": true
            },
            {
              "fieldLabel": "Trigger word"
            },
            {
              "fieldLabel": "Lead Magnet Link"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "53fcfde8-9ff4-4aa5-832b-0e3c92ad4a60",
      "name": "Obtenir toutes les lignes où le MP est déjà envoyé",
      "type": "n8n-nodes-base.nocoDb",
      "onError": "continueRegularOutput",
      "position": [
        -1312,
        256
      ],
      "parameters": {
        "table": "mjmgjsh2x620k0x",
        "options": {
          "where": "(dm_status,eq,sent)"
        },
        "operation": "getAll",
        "projectId": "p2gtuxj1nvc3neq",
        "returnAll": true,
        "authentication": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "id": "XcfeXxqx8zD1546V",
          "name": "NocoDB Token account"
        }
      },
      "executeOnce": true,
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "ada51a6b-cd73-4d10-b608-de166a7d716f",
      "name": "Obtenir toutes les lignes où la connexion est déjà demandée",
      "type": "n8n-nodes-base.nocoDb",
      "onError": "continueRegularOutput",
      "position": [
        -1312,
        432
      ],
      "parameters": {
        "table": "mjmgjsh2x620k0x",
        "options": {
          "where": "(dm_status,eq,connection request)"
        },
        "operation": "getAll",
        "projectId": "p2gtuxj1nvc3neq",
        "returnAll": true,
        "authentication": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "id": "XcfeXxqx8zD1546V",
          "name": "NocoDB Token account"
        }
      },
      "executeOnce": true,
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "99c06ab8-d8c2-4a24-96c6-2414637de362",
      "name": "Si",
      "type": "n8n-nodes-base.if",
      "position": [
        -912,
        432
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "06df5494-c414-4d37-990d-23bde419ade0",
              "operator": {
                "type": "array",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.filtered }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "3b0c794d-2cc3-4ea7-8502-f463735fbdff",
      "name": "Diviser Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -688,
        528
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "filtered"
      },
      "typeVersion": 1
    },
    {
      "id": "58423c5a-1752-4619-b13b-e9db40c5536c",
      "name": "Si1",
      "type": "n8n-nodes-base.if",
      "position": [
        -880,
        256
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "0cd4f32e-0bbc-47bd-ac34-375674c2645d",
              "operator": {
                "type": "array",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.filtered }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "91ea38f7-8543-48f5-850c-cc2f87f3df15",
      "name": "Note autocollante",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2848,
        -112
      ],
      "parameters": {
        "color": 3,
        "height": 624,
        "content": "## Settings \n- post ID\n- trigger\n- lead magnet URL"
      },
      "typeVersion": 1
    },
    {
      "id": "0d264a0d-c68f-4678-8ca3-cafee56b5659",
      "name": "Note autocollante1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        -128
      ],
      "parameters": {
        "color": 4,
        "width": 736,
        "height": 640,
        "content": "## Get all the comments from the post \n- get all comments\n- Filter the ones that contains the trigger word"
      },
      "typeVersion": 1
    },
    {
      "id": "a4cdc330-1abf-4f40-91ff-98141fa17f2a",
      "name": "Note autocollante2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1600,
        -128
      ],
      "parameters": {
        "height": 640,
        "content": "## Check if we are connected\n- check the connection level\n- if it's 1 we can send the DM directly\n- if not we first ask them to connect"
      },
      "typeVersion": 1
    },
    {
      "id": "e0ad1538-b3fb-4a5e-b018-bdbb7acd832e",
      "name": "Note autocollante3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        -128
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 656,
        "content": "## Filter the ones where already have sent messages\nIn both cases, check Nocodb to see if we already have sent a DM or a connection request to avoid double-sends. "
      },
      "typeVersion": 1
    },
    {
      "id": "bd2ed89d-3e4c-40db-ae29-f9807297feff",
      "name": "Note autocollante4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        400
      ],
      "parameters": {
        "width": 480,
        "height": 288,
        "content": "## Ask them to connect\n- Answer to their comment by asking them to connect. "
      },
      "typeVersion": 1
    },
    {
      "id": "aa311fce-6a8b-4b99-bc7c-ebd822092395",
      "name": "Note autocollante5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -128
      ],
      "parameters": {
        "color": 4,
        "width": 512,
        "height": 400,
        "content": "## Merge both branches and filter if there is more pages\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5763954f-592b-45bf-b272-bc2b795d5646",
      "name": "Note autocollante6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2544,
        -128
      ],
      "parameters": {
        "width": 176,
        "height": 640,
        "content": "## Initialize the cursor to avoid errors"
      },
      "typeVersion": 1
    },
    {
      "id": "068fc009-9ba5-49e5-ab8e-13b142fd2fbb",
      "name": "Note autocollante7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -816
      ],
      "parameters": {
        "color": 3,
        "width": 1264,
        "height": 656,
        "content": "## Send the DMs\n- Create a loop so we can log and send them one by one. \n- Add a wait time of a few minutes to avoid problems with linkedin ates and make it random to make it seems more natural. \n- Send the DM including the first name and the link to the lead magnet. \n- Comment a comment with a variable message to make it seem more natural. \n- Log everything into Nocodb. "
      },
      "typeVersion": 1
    },
    {
      "id": "5f50991b-1d89-4876-9b2a-429d7fe52ceb",
      "name": "Filtrer les personnes à qui nous n'avons pas encore envoyé le MP",
      "type": "n8n-nodes-base.code",
      "position": [
        -1120,
        256
      ],
      "parameters": {
        "jsCode": "const messageSent = $('Get all the rows where the dm is already sent').all().map(item => item.json.linkedin_id)\nconst attendees = $(\"Check if we are connected\").all().map(item =>item.json)\n\nconsole.log(\"messageSent\", messageSent, \"attendees\", attendees)\n\nconst filtered = attendees.filter(item => !messageSent?.includes(item.author_details.id))\n\nreturn {filtered}"
      },
      "executeOnce": true,
      "typeVersion": 2
    },
    {
      "id": "678cfdb0-3af3-419d-bcc2-f8d120818986",
      "name": "Filtrer les personnes à qui nous n'avons pas encore demandé la connexion",
      "type": "n8n-nodes-base.code",
      "position": [
        -1136,
        432
      ],
      "parameters": {
        "jsCode": "const messageSent =  $(\"Get all the rows where the connection is already asked\").all().map(item => item.json.linkedin_id)\nconst attendees = $(\"Check if we are connected\").all().map(item =>item.json)\n\nconsole.log(\"messageSent\", messageSent, \"attendees\", attendees)\n\nconst filtered = attendees.filter(item => !messageSent?.includes(item.author_details.id) && item.reply_counter===0)\n\nreturn {filtered}"
      },
      "executeOnce": true,
      "typeVersion": 2
    }
  ],
  "active": false,
  "pinData": {
    "On form submission": [
      {
        "json": {
          "Post ID": "7363967259746168833",
          "formMode": "test",
          "submittedAt": "2025-08-25T04:10:13.632-04:00",
          "Trigger word": "leads",
          "Lead Magnet Link": "https://cutzai.kit.com/emails"
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2bc281a2-a2ef-486e-bf63-c9bee5b530f6",
  "connections": {
    "99c06ab8-d8c2-4a24-96c6-2414637de362": {
      "main": [
        [
          {
            "node": "3b0c794d-2cc3-4ea7-8502-f463735fbdff",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c3cdda9f-b21a-40ac-9193-b77f2535139b",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "58423c5a-1752-4619-b13b-e9db40c5536c": {
      "main": [
        [
          {
            "node": "6c3638b7-86bc-4d3f-9ad8-f4d87c4a1d8e",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c3cdda9f-b21a-40ac-9193-b77f2535139b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3b2c3445-8ff2-4006-9008-4f23f52d1e36": {
      "main": [
        [
          {
            "node": "7177bfc0-b56c-4521-959e-501268b361fe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c3cdda9f-b21a-40ac-9193-b77f2535139b": {
      "main": [
        [
          {
            "node": "475b811e-d5b5-4ab9-abfb-cfbb025c9f2c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4a85ebfe-12d4-401d-8521-5e0ffd1dfaf1": {
      "main": [
        [
          {
            "node": "406b0a33-714a-4ad3-acef-434feb3de2c4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "475b811e-d5b5-4ab9-abfb-cfbb025c9f2c": {
      "main": [
        [
          {
            "node": "4a85ebfe-12d4-401d-8521-5e0ffd1dfaf1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3b0c794d-2cc3-4ea7-8502-f463735fbdff": {
      "main": [
        [
          {
            "node": "ad6c2ab6-e5c2-434d-964b-d45636084c91",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e98b0d3a-8ad1-4473-8d38-c447b48d6570": {
      "main": [
        [
          {
            "node": "65900582-c07f-410e-9f5b-10d111b7c2ba",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6c3638b7-86bc-4d3f-9ad8-f4d87c4a1d8e": {
      "main": [
        [
          {
            "node": "c59ecad0-b18d-44e6-bc79-9eb0fac6598c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "10204b8f-33a2-46ad-b99c-5d8a4b5e0ed6": {
      "main": [
        [
          {
            "node": "c59ecad0-b18d-44e6-bc79-9eb0fac6598c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ea3a1e71-262d-4439-9bae-77ebb8a25347": {
      "main": [
        [
          {
            "node": "c3cdda9f-b21a-40ac-9193-b77f2535139b",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "c59ecad0-b18d-44e6-bc79-9eb0fac6598c": {
      "main": [
        [
          {
            "node": "c3cdda9f-b21a-40ac-9193-b77f2535139b",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "3b2c3445-8ff2-4006-9008-4f23f52d1e36",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0a6e88d7-3ed6-4af3-947a-bea5def22034": {
      "main": [
        [
          {
            "node": "10204b8f-33a2-46ad-b99c-5d8a4b5e0ed6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ad6c2ab6-e5c2-434d-964b-d45636084c91": {
      "main": [
        [
          {
            "node": "ea3a1e71-262d-4439-9bae-77ebb8a25347",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "51b7817f-0901-4c22-b91d-b78243e498c2": {
      "main": [
        [
          {
            "node": "4a85ebfe-12d4-401d-8521-5e0ffd1dfaf1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "80749fe9-8b5e-4f5a-b719-7cae5eec114c": {
      "main": [
        [
          {
            "node": "0a6e88d7-3ed6-4af3-947a-bea5def22034",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "406b0a33-714a-4ad3-acef-434feb3de2c4": {
      "main": [
        [
          {
            "node": "e98b0d3a-8ad1-4473-8d38-c447b48d6570",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7177bfc0-b56c-4521-959e-501268b361fe": {
      "main": [
        [
          {
            "node": "80749fe9-8b5e-4f5a-b719-7cae5eec114c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a2ad6646-25c5-4774-9e5b-f1ee4a0f58e4": {
      "main": [
        [
          {
            "node": "53fcfde8-9ff4-4aa5-832b-0e3c92ad4a60",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ada51a6b-cd73-4d10-b608-de166a7d716f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "65900582-c07f-410e-9f5b-10d111b7c2ba": {
      "main": [
        [
          {
            "node": "a2ad6646-25c5-4774-9e5b-f1ee4a0f58e4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "53fcfde8-9ff4-4aa5-832b-0e3c92ad4a60": {
      "main": [
        [
          {
            "node": "5f50991b-1d89-4876-9b2a-429d7fe52ceb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5f50991b-1d89-4876-9b2a-429d7fe52ceb": {
      "main": [
        [
          {
            "node": "58423c5a-1752-4619-b13b-e9db40c5536c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "678cfdb0-3af3-419d-bcc2-f8d120818986": {
      "main": [
        [
          {
            "node": "99c06ab8-d8c2-4a24-96c6-2414637de362",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ada51a6b-cd73-4d10-b608-de166a7d716f": {
      "main": [
        [
          {
            "node": "678cfdb0-3af3-419d-bcc2-f8d120818986",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

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, 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

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds32
Catégorie2
Types de nœuds11
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Alexandra Spalato

Alexandra Spalato

@alexaspalato

I'm an AI automation consultant with over a decade of experience in web development. I help businesses streamline their marketing and operations by building custom n8n workflows that save time and boost results. Ready to see what automation can do for your business? Use my link to book your initial consultation.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34