{
  "name": "Send personalized LinkedIn DMs to profile visitors with ConnectSafely.ai and Google Sheets",
  "nodes": [
    {
      "id": "f64b448a-f0eb-4dd8-a05f-20711f8f1c26",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2304,
        -240
      ],
      "parameters": {
        "width": 588,
        "height": 852,
        "content": "## Send Personalized DMs to LinkedIn Profile Visitors\n\nThis workflow automatically identifies people who visited your LinkedIn profile and sends them personalized direct messages or connection request"
      }
    },
    {
      "id": "a0c192b8-e394-4ba1-ab5a-af47abdf6937",
      "name": "Section 1 - Fetch Visitors",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1686,
        84
      ],
      "parameters": {
        "width": 460,
        "height": 284,
        "content": "## 1. Fetch & Split Visitors\nRetrieves profile visitors and prepares them for individual processing."
      }
    },
    {
      "id": "3a053157-fec1-465e-9154-8189edf61c96",
      "name": "Section 2 - Deduplicate",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        48
      ],
      "parameters": {
        "width": 520,
        "height": 316,
        "content": "## 2. Deduplicate\nChecks if visitor was already contacted to avoid duplicate outreach."
      }
    },
    {
      "id": "ae2c1f44-4f82-42fc-bfc5-4243d477f9c8",
      "name": "Section 3 - Send Messages",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -176
      ],
      "parameters": {
        "width": 844,
        "height": 532,
        "content": "## 3. Route & Send Messages\nSends DMs to connected users or connection requests to new prospects."
      }
    },
    {
      "id": "d859a78a-66dd-47b4-ba6a-2471c96aee86",
      "name": "Section 4 - Track Progress",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        -176
      ],
      "parameters": {
        "width": 480,
        "height": 532,
        "content": "## 4. Track & Loop\nLogs outreach to Google Sheets and processes next visitor."
      }
    },
    {
      "id": "10ccda8b-2c59-48ea-a2ba-a50725c4f198",
      "name": "Extract Profile ID from URL",
      "type": "n8n-nodes-base.code",
      "position": [
        -272,
        64
      ]
    },
    {
      "id": "0d693106-d391-4c15-8eee-c878b5c24e3c",
      "name": "Fetch Profile Visitors",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1392,
        208
      ]
    },
    {
      "id": "7000a0b8-3431-4fca-b696-2c4fee4d0aeb",
      "name": "Weekly Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1616,
        208
      ]
    },
    {
      "id": "6a27975a-28b9-4e9d-8cb3-f9c1731b735e",
      "name": "Send Connection Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        160
      ]
    },
    {
      "id": "22cb5dc4-555d-4cba-8599-d4d128e20180",
      "name": "Check if 1st Degree Connection",
      "type": "n8n-nodes-base.if",
      "position": [
        -48,
        64
      ]
    },
    {
      "id": "2fedafe7-567e-4cdc-83db-7da8ce3a9fa6",
      "name": "Send DM to Connected User",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        -32
      ]
    },
    {
      "id": "af60a93f-7b21-4187-a243-93c648b0f348",
      "name": "Generate Message for New Connection",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        160
      ]
    },
    {
      "id": "a80ac098-2ff0-456b-8675-151fc9c0c170",
      "name": "Generate DM for Connected User",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        -32
      ]
    },
    {
      "id": "f472a968-d6c3-4a94-a323-3bd80c31eaad",
      "name": "Split Visitors Array",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -1168,
        208
      ]
    },
    {
      "id": "0fec9210-7b84-4618-990c-a73462a32be5",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -944,
        208
      ]
    },
    {
      "id": "f32e7660-6f6f-4566-ae5d-9da2353f5fe0",
      "name": "Continue to Next Visitor",
      "type": "n8n-nodes-base.noOp",
      "position": [
        848,
        64
      ]
    },
    {
      "id": "2a92195e-9b9f-4613-8111-8b3c046f18a8",
      "name": "Wait Between Messages",
      "type": "n8n-nodes-base.wait",
      "position": [
        1072,
        304
      ]
    },
    {
      "id": "04b34961-4e22-4d7a-85b4-d8f4e2cb78e5",
      "name": "Log DM Sent to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        624,
        -32
      ]
    },
    {
      "id": "80964e3b-aac9-4950-8cf5-99378edba2e2",
      "name": "Check if Already Contacted",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -720,
        136
      ]
    },
    {
      "id": "61c6dbdc-97f1-4bae-8cae-baf823f63803",
      "name": "Skip if Already Contacted",
      "type": "n8n-nodes-base.if",
      "position": [
        -496,
        136
      ]
    },
    {
      "id": "23d345d5-df7c-41f2-a181-7b731b631a50",
      "name": "Log Connection Request to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        624,
        160
      ]
    }
  ],
  "connections": {
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Check if Already Contacted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log DM Sent to Sheet": {
      "main": [
        [
          {
            "node": "Continue to Next Visitor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Visitors Array": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Between Messages": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Profile Visitors": {
      "main": [
        [
          {
            "node": "Split Visitors Array",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Connection Request": {
      "main": [
        [
          {
            "node": "Log Connection Request to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Schedule Trigger": {
      "main": [
        [
          {
            "node": "Fetch Profile Visitors",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Continue to Next Visitor": {
      "main": [
        [
          {
            "node": "Wait Between Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send DM to Connected User": {
      "main": [
        [
          {
            "node": "Log DM Sent to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Skip if Already Contacted": {
      "main": [
        [
          {
            "node": "Extract Profile ID from URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Between Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Already Contacted": {
      "main": [
        [
          {
            "node": "Skip if Already Contacted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Profile ID from URL": {
      "main": [
        [
          {
            "node": "Check if 1st Degree Connection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if 1st Degree Connection": {
      "main": [
        [
          {
            "node": "Generate DM for Connected User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Message for New Connection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate DM for Connected User": {
      "main": [
        [
          {
            "node": "Send DM to Connected User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Connection Request to Sheet": {
      "main": [
        [
          {
            "node": "Continue to Next Visitor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Message for New Connection": {
      "main": [
        [
          {
            "node": "Send Connection Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}