{
  "id": "igbfDivcPe7YfSBtEjt5C",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "LeadGen SourceGeek - Jan 26 - Outreach",
  "tags": [],
  "nodes": [
    {
      "id": "b17ca28d-0329-43a5-9f5a-e5d23654909f",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -240,
        -48
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "87d9d78a-0a7e-4f71-b0d4-6dcc522ad8c8",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        208,
        -48
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "9016870a-7f47-45ed-8c83-95c48cb6a220",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -16,
        -48
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "y",
              "lookupColumn": "Start outreach"
            },
            {
              "lookupColumn": "1st message sent"
            },
            {
              "lookupColumn": "Stop outreach"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1TrxzQGP5BetWRBcupPV1bBZrgNEQizmY5_TIolNg5Dw/edit#gid=0",
          "cachedResultName": "Data"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1TrxzQGP5BetWRBcupPV1bBZrgNEQizmY5_TIolNg5Dw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1TrxzQGP5BetWRBcupPV1bBZrgNEQizmY5_TIolNg5Dw/edit?usp=drivesdk",
          "cachedResultName": "Lead Get SourceGeek - Jan 26"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "7d07f5af-9a0b-4869-940f-05b1c3dae5b1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -288
      ],
      "parameters": {
        "color": 7,
        "width": 1584,
        "height": 448,
        "content": "## Sending out 1st message"
      },
      "typeVersion": 1
    },
    {
      "id": "c2990da7-7dbf-48fa-bdb9-430a5716f36e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -208
      ],
      "parameters": {
        "color": 5,
        "width": 160,
        "height": 128,
        "content": "Get the required data from a Google Sheet. Needed is the LinkedIn Profile url and the 1st message"
      },
      "typeVersion": 1
    },
    {
      "id": "c632cf23-3dbf-44dc-8371-6b14401dcc41",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -240
      ],
      "parameters": {
        "color": 5,
        "width": 160,
        "height": 96,
        "content": "Send out the message to the specific LinkedIn profile"
      },
      "typeVersion": 1
    },
    {
      "id": "7ee1168f-02f8-42a3-ab58-b2466d2ab3e6",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        -240
      ],
      "parameters": {
        "color": 5,
        "width": 368,
        "height": 96,
        "content": "Get the current date in the right format.\n\nUpdate the initial sheet so this action is tagged"
      },
      "typeVersion": 1
    },
    {
      "id": "c447f31b-30ad-4777-b80d-bc13c1a4181f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        -160
      ],
      "parameters": {
        "color": 5,
        "width": 160,
        "height": 96,
        "content": "Wait a short moment before sending a new message"
      },
      "typeVersion": 1
    },
    {
      "id": "c795b92b-09bf-434b-b004-bc331ff7c816",
      "name": "Send message to LinkedIn profile",
      "type": "n8n-nodes-sourcegeek.sourcegeek",
      "position": [
        432,
        -128
      ],
      "parameters": {
        "message": "={{ $json[\"First message\"] }}",
        "operation": "sendMessage",
        "linkedinUrl": "={{ $json[\"LinkedIn profile URL\"] }}"
      },
      "credentials": {
        "sourcegeekCredentialsApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dbf32726-017f-49bd-a66d-d8b859e6b554",
      "name": "Wait 1 minute before the next message is send",
      "type": "n8n-nodes-base.wait",
      "position": [
        1104,
        -48
      ],
      "parameters": {
        "unit": "minutes",
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "4f4a7a5f-e528-41c5-981d-3f78af90f95d",
      "name": "Update selected row in sheet with timestamp",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        880,
        -128
      ],
      "parameters": {
        "columns": {
          "value": {
            "1st message sent": "={{ $json.current }}",
            "LinkedIn profile URL": "={{ $('Loop Over Items').item.json[\"LinkedIn profile URL\"] }}"
          },
          "schema": [
            {
              "id": "First name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "First name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Last name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn profile URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "LinkedIn profile URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn profile image",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "LinkedIn profile image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Role",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Role",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Ready",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Ready",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ICP Score",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ICP Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ICP reasoning",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "ICP reasoning",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "First message",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "First message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Second message",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Second message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Third message",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Third message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Start outreach",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Start outreach",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "1st message sent",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "1st message sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "LinkedIn profile URL"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1TrxzQGP5BetWRBcupPV1bBZrgNEQizmY5_TIolNg5Dw/edit#gid=0",
          "cachedResultName": "Data"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1TrxzQGP5BetWRBcupPV1bBZrgNEQizmY5_TIolNg5Dw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1TrxzQGP5BetWRBcupPV1bBZrgNEQizmY5_TIolNg5Dw/edit?usp=drivesdk",
          "cachedResultName": "Lead Get SourceGeek - Jan 26"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e18e4920-abf4-4a3c-9850-d68403d9de5b",
      "name": "JS code to generate timestamp",
      "type": "n8n-nodes-base.code",
      "position": [
        656,
        -128
      ],
      "parameters": {
        "jsCode": "//var date = new Date().toISOString();\n//var day = new Date().getDay();\n\nconst date = new Date();\nconst weekday = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nconst months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\nconst day = date.getDay();\nconst currentdate = date.getDate();\nconst month = date.getMonth();\nconst year = date.getFullYear();\nconst currentTime = date.getHours()+':'+date.getMinutes()+':'+date.getSeconds();\n\nitems[0].json.date_today = date;\nitems[0].json.day_today = weekday[day];\nitems[0].json.current = weekday[day]+' '+currentdate+' '+months[month]+' '+year+' '+currentTime;\n\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "44cf2b98-5931-4d09-8ca1-b75ea797973e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        -304
      ],
      "parameters": {
        "width": 272,
        "height": 480,
        "content": "## How it works\nThis workflow can be used to send out a message to a specific LinkedIn profile. The data for the profile and the content of the message are coming from a Google Sheet.\n\nFor sending the message from your LinkedIn profile to another LinkedIn user, the SourceGeek node is being used.\n\nAfter the message is successfully sent, the initial row in the Google Sheet will be updated with a timestamp."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "edb86688-95d5-438d-a8d0-bb70c523d899",
  "connections": {
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Send message to LinkedIn profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JS code to generate timestamp": {
      "main": [
        [
          {
            "node": "Update selected row in sheet with timestamp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send message to LinkedIn profile": {
      "main": [
        [
          {
            "node": "JS code to generate timestamp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update selected row in sheet with timestamp": {
      "main": [
        [
          {
            "node": "Wait 1 minute before the next message is send",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 1 minute before the next message is send": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}