{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "9ee2794b-b0ca-45f3-af78-5089b156a4bc",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -784,
        -592
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d1e6e3bd-8ad2-4415-8c9a-f3bd035fd4ed",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        288,
        -592
      ],
      "parameters": {
        "maxItems": 5
      },
      "typeVersion": 1
    },
    {
      "id": "59fef9a9-9191-4af8-b050-4eb80c91cedf",
      "name": "isnotconnected",
      "type": "n8n-nodes-browserflow.browserflow",
      "position": [
        -464,
        -48
      ],
      "parameters": {
        "linkedinUrl": "={{ $('contacts').item.json.url }}"
      },
      "credentials": {
        "browserflowApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5b597bf1-d128-4c56-aa5b-50e9a875f4f7",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -224,
        -48
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a71cb67c-639f-49e5-9d64-30b19a067e20",
              "operator": {
                "type": "boolean",
                "operation": "false",
                "singleValue": true
              },
              "leftValue": "={{ $json.is_connection }}",
              "rightValue": ""
            },
            {
              "id": "52065840-16a5-4492-b914-c09383cae858",
              "operator": {
                "type": "boolean",
                "operation": "false",
                "singleValue": true
              },
              "leftValue": "={{ $json.is_pending }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "cc8cfe32-d384-4d22-9f71-8f238771dede",
      "name": "sendinvite",
      "type": "n8n-nodes-browserflow.browserflow",
      "position": [
        288,
        -240
      ],
      "parameters": {
        "message": "={{ $json.message }}",
        "operation": "sendConnectionInvite",
        "addMessage": true,
        "linkedinUrl": "={{ $('contacts').item.json.url }}"
      },
      "credentials": {
        "browserflowApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6ae4df3c-92fb-4330-b185-7c2cc18097fc",
      "name": "message",
      "type": "n8n-nodes-base.set",
      "position": [
        16,
        -240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "499bbff5-88f0-4c51-acae-71106cd32c4d",
              "name": "message",
              "type": "string",
              "value": "=Dear {{ $('contacts').item.json.firstname }},\nRight now building a framework to help revenu teams to drive efficient outbound strategies. This n8n automation is part of the solution. Happy to connect and get your feedback !\nThe n8n About team."
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d1e4c9c7-805e-4d16-956f-fe2b49ae4cbf",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -752,
        -64
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "072908e0-eb3a-429e-9b93-b61c5520b423",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        800,
        128
      ],
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "f977bbc7-1841-4157-9caf-de34b7bac7af",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        -784
      ],
      "parameters": {
        "color": 7,
        "width": 688,
        "height": 1472,
        "content": "# Manage LinkedIn Invitations with Browserflow\n**Automate personalized LinkedIn outreach while maintaining human-like behavior**\n\n## Overview\nThis workflow helps you send targeted LinkedIn invitations with customized messages, automatically checking existing connections to avoid duplicate requests. Perfect for recruiters, sales professionals, and anyone building their professional network systematically.\n\n## How It Works\n1. **Contact Management**: Store your prospects in a Google Sheet with their LinkedIn profile URLs\n2. **Connection Verification**: Automatically check if you're already connected to avoid duplicate invitations\n3. **Smart Invitations**: Send personalized invitations to new contacts\n4. **Progress Tracking**: Update the Google Sheet with invitation status\n\n## Setup Instructions\n\n### Prerequisites\n- **Google account** with Sheets access\n- **Browserflow account** with available credits ([sign up here](https://browserflow.io/))\n- **n8n instance** (tested on version 1.109.1)\n\n### Step-by-Step Setup\n1. **Prepare Your Contact List**\n   - Download the [Google Sheet Template](https://docs.google.com/spreadsheets/d/1mFKp3wmbV9qp2tpGGsN72zdiC32y8H1nhjdgP885y-U/edit?usp=sharing)\n   - Make a copy to your Google Drive\n   - Extract the Sheet ID from your URL (the string between `/d/` and `/edit`)\n\n2. **Configure Workflow Settings**\n   - Open the `settings` node and enter your Google Sheet ID\n   - Customize your invitation message in the `message` node\n   - Set up your Google Sheets credentials\n   - Configure your Browserflow credentials\n\n3. **Populate Your Data**\n   - Add contacts to your Google Sheet with their LinkedIn profile URLs\n\n4. **Test & Deploy**\n   - Run a test with 1-2 contacts first (update the `Limit` node)\n   - Monitor execution and adjust `Wait` if needed \n\n## Important Considerations\n\n- **Responsible Usage**: This tool mimics human behavior and respects LinkedIn's natural usage patterns. It's designed for quality networking, not mass spamming.\n\n- **Rate Limits**: Stay within LinkedIn's acceptable limits.\n\n- **Account Safety**: Excessive automation can result in LinkedIn restrictions. Always prioritize authentic, valuable connections.\n\n\n## Support & Community\n\nNeed assistance? Here's how to get help:\n- **LinkedIn Discussion**: Comment on this [workflow post](https://www.linkedin.com/posts/n8n-about_n8n-browserflow-activity-7368758690025320448-zupZ/)\n- **Direct Contact**: Connect with me on [LinkedIn](https://www.linkedin.com/in/stephaneheckel/)\n- **Community Forum**: Ask questions in the [n8n Community](https://community.n8n.io/)\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "490770f2-7aa1-420e-9c5c-e40357f548a7",
      "name": "contacts",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -256,
        -592
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1877973285,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VPUd7xbigvW4dIjyvsSRn3Y3jpITjyZneCIEU0HK_Hw/edit#gid=1877973285",
          "cachedResultName": "contacts"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.googlesheetid }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "43996334-8e32-4f69-88d4-1ff420baa73c",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -720
      ],
      "parameters": {
        "color": 7,
        "width": 192,
        "height": 96,
        "content": "\n[Google Sheet Template](https://docs.google.com/spreadsheets/d/1mFKp3wmbV9qp2tpGGsN72zdiC32y8H1nhjdgP885y-U/edit?usp=sharing)\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d071f42c-af34-4e17-8f12-19dbc2d65f74",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -720
      ],
      "parameters": {
        "color": 7,
        "width": 192,
        "height": 96,
        "content": "Set the Google Sheet ID you want to use"
      },
      "typeVersion": 1
    },
    {
      "id": "086470a9-e3c7-455c-89c6-4c16c432a0b8",
      "name": "settings",
      "type": "n8n-nodes-base.set",
      "position": [
        -496,
        -592
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "4b74909d-6a40-422f-9d5a-1d72f5577f3f",
              "name": "googlesheetid",
              "type": "string",
              "value": "<input your google sheet ID here>"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2fbf5436-3336-47c5-b4b3-d58399b7f588",
      "name": "updatecontact",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        576,
        128
      ],
      "parameters": {
        "columns": {
          "value": {
            "invitation": "={{ $('isnotconnected').item.json.is_pending ? \"pending\" : \"connected\" }}",
            "row_number": "={{ $('contacts').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "firstname",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "firstname",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "lastname",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "lastname",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "company",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "process",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "process",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "err",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "err",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "invitation",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "invitation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "contacts"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('settings').item.json.googlesheetid }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "49059013-0634-40f4-981b-35abae3f50f4",
      "name": "updateinvitation",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        576,
        -240
      ],
      "parameters": {
        "columns": {
          "value": {
            "invitation": "Y",
            "row_number": "={{ $('contacts').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "firstname",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "firstname",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "lastname",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "lastname",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "company",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "process",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "process",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "err",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "err",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "invitation",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "invitation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "contacts"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('settings').item.json.googlesheetid }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "8142467b-f381-418c-b60b-ce3d3302bd2a",
      "name": "alreadyconnectedorpending",
      "type": "n8n-nodes-base.noOp",
      "position": [
        16,
        128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1e374508-72e5-44ef-bc64-e02e63ccffd9",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -720
      ],
      "parameters": {
        "color": 7,
        "width": 192,
        "height": 96,
        "content": "Only contacts with empty \"invitation\""
      },
      "typeVersion": 1
    },
    {
      "id": "c44aa167-8328-4360-ad92-a4c8b840ae47",
      "name": "finallist",
      "type": "n8n-nodes-base.filter",
      "position": [
        16,
        -592
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d1bb2dee-2f47-43df-afe7-99a558791923",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.invitation }}",
              "rightValue": "={{ $('settings').item.json.employee }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a101058d-12b1-478c-8df5-795b1df17759",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -352
      ],
      "parameters": {
        "color": 7,
        "width": 192,
        "height": 368,
        "content": "Update the invitation message in this node !"
      },
      "typeVersion": 1
    },
    {
      "id": "aca1f550-7b02-49e2-867f-5834379cc176",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        -352
      ],
      "parameters": {
        "color": 7,
        "width": 192,
        "height": 96,
        "content": "Flag the contact as   invited. invitation = \"Y\""
      },
      "typeVersion": 1
    },
    {
      "id": "8985a78d-08a1-4f27-9271-98f2ad09cf44",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -720
      ],
      "parameters": {
        "color": 7,
        "width": 192,
        "height": 96,
        "content": "Only for test / debug"
      },
      "typeVersion": 1
    },
    {
      "id": "72db3d5a-c0f2-4dc4-b6e1-8fe11255832a",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        320
      ],
      "parameters": {
        "color": 7,
        "width": 192,
        "height": 96,
        "content": "Flag the contact as   \"connected\" or \"pending\""
      },
      "typeVersion": 1
    },
    {
      "id": "ff214055-3496-4feb-9d7a-528ea54064a3",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 192,
        "height": 96,
        "content": "Update the Wait amount here"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "alreadyconnectedorpending",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "message": {
      "main": [
        [
          {
            "node": "sendinvite",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "contacts": {
      "main": [
        [
          {
            "node": "finallist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "settings": {
      "main": [
        [
          {
            "node": "contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "finallist": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "sendinvite": {
      "main": [
        [
          {
            "node": "updateinvitation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "updatecontact": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isnotconnected": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "isnotconnected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "updateinvitation": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "alreadyconnectedorpending": {
      "main": [
        [
          {
            "node": "updatecontact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}