LinkedIn自动私信潜在客户磁铁

高级

这是一个Lead Nurturing、Multimodal AI领域的自动化工作流,包含 32 个节点。主要使用 If、Code、Wait、Merge、Filter 等节点。 LinkedIn潜在客户生成:基于评论触发的自动私信系统(Unipile & NocoDB)

前置要求
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "adTN1ACEd55SvrfK",
  "meta": {
    "instanceId": "eb3cc320bca8046d48c5a85268d37732357adb476937d06e2fa23aaf467734b3"
  },
  "name": "Linkedin 自动私信潜在客户磁铁",
  "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": "从帖子获取评论",
      "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": "分离输出1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -2032,
        288
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "items"
      },
      "typeVersion": 1
    },
    {
      "id": "a2ad6646-25c5-4774-9e5b-f1ee4a0f58e4",
      "name": "检查是否已连接",
      "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": "使用触发器过滤评论",
      "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": "发送带潜在客户磁铁的私信",
      "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": "回复评论",
      "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": "创建消息轮换",
      "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": "创建一行",
      "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": "请求连接",
      "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": "遍历项目 1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -256,
        -112
      ],
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "typeVersion": 3
    },
    {
      "id": "3b2c3445-8ff2-4006-9008-4f23f52d1e36",
      "name": "等待",
      "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": "分离输出2",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -496,
        -112
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "filtered"
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "4a85ebfe-12d4-401d-8521-5e0ffd1dfaf1",
      "name": "游标",
      "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": "合并1",
      "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": "过滤器1",
      "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": "创建一行2",
      "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": "表单提交时",
      "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": "获取所有已发送私信的行",
      "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": "获取所有已请求连接的行",
      "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": "如果",
      "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": "拆分输出",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -688,
        528
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "filtered"
      },
      "typeVersion": 1
    },
    {
      "id": "58423c5a-1752-4619-b13b-e9db40c5536c",
      "name": "如果1",
      "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": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2848,
        -112
      ],
      "parameters": {
        "color": 3,
        "height": 624,
        "content": "## 设置"
      },
      "typeVersion": 1
    },
    {
      "id": "0d264a0d-c68f-4678-8ca3-cafee56b5659",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        -128
      ],
      "parameters": {
        "color": 4,
        "width": 736,
        "height": 640,
        "content": "## 从帖子获取所有评论"
      },
      "typeVersion": 1
    },
    {
      "id": "a4cdc330-1abf-4f40-91ff-98141fa17f2a",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1600,
        -128
      ],
      "parameters": {
        "height": 640,
        "content": "## 检查是否已连接"
      },
      "typeVersion": 1
    },
    {
      "id": "e0ad1538-b3fb-4a5e-b018-bdbb7acd832e",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        -128
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 656,
        "content": "## 过滤已发送消息的评论"
      },
      "typeVersion": 1
    },
    {
      "id": "bd2ed89d-3e4c-40db-ae29-f9807297feff",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        400
      ],
      "parameters": {
        "width": 480,
        "height": 288,
        "content": "## 请求他们连接"
      },
      "typeVersion": 1
    },
    {
      "id": "aa311fce-6a8b-4b99-bc7c-ebd822092395",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -128
      ],
      "parameters": {
        "color": 4,
        "width": 512,
        "height": 400,
        "content": "## 合并两个分支并检查是否有更多页面"
      },
      "typeVersion": 1
    },
    {
      "id": "5763954f-592b-45bf-b272-bc2b795d5646",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2544,
        -128
      ],
      "parameters": {
        "width": 176,
        "height": 640,
        "content": "## 初始化游标以避免错误"
      },
      "typeVersion": 1
    },
    {
      "id": "068fc009-9ba5-49e5-ab8e-13b142fd2fbb",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -816
      ],
      "parameters": {
        "color": 3,
        "width": 1264,
        "height": 656,
        "content": "## 发送私信"
      },
      "typeVersion": 1
    },
    {
      "id": "5f50991b-1d89-4876-9b2a-429d7fe52ceb",
      "name": "过滤我们尚未发送私信的人员",
      "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": "过滤我们尚未请求连接的人员",
      "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": {
    "If": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Split Out2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Send DM with Lead Magnet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Filter1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cursor": {
      "main": [
        [
          {
            "node": "Get Comments from Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter1": {
      "main": [
        [
          {
            "node": "cursor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Ask For connection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Filter Comments with trigger",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out2": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a row": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a row2": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Answer to comment": {
      "main": [
        [
          {
            "node": "Create a row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ask For connection": {
      "main": [
        [
          {
            "node": "Create a row2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "cursor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Message Rotation": {
      "main": [
        [
          {
            "node": "Answer to comment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Comments from Posts": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send DM with Lead Magnet": {
      "main": [
        [
          {
            "node": "Create Message Rotation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if we are connected": {
      "main": [
        [
          {
            "node": "Get all the rows where the dm is already sent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get all the rows where the connection is already asked",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Comments with trigger": {
      "main": [
        [
          {
            "node": "Check if we are connected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all the rows where the dm is already sent": {
      "main": [
        [
          {
            "node": "Filter people where we have not sent the DM yet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter people where we have not sent the DM yet": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter people where we have not asked connexion yet": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all the rows where the connection is already asked": {
      "main": [
        [
          {
            "node": "Filter people where we have not asked connexion yet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

这是一个高级难度的工作流,适用于Lead Nurturing、Multimodal AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量32
分类2
节点类型11
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
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.

外部链接
在 n8n.io 上查看 →

分享此工作流