{
  "name": "Apollo data enrichment using Company Id, Google Sheets & Telegram",
  "nodes": [
    {
      "id": "d30e14d8-f655-40c1-9d7a-447bee02a0a3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -352
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "7f7f9dd6-e4a0-40dc-abd1-7745b44915c0",
      "name": "Get Apollo Company ID",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1120,
        176
      ]
    },
    {
      "id": "3fc379b1-8a06-4679-ae22-a8cfd96aea27",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1024,
        -352
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "2989f2c4-72d2-44c7-9a7b-14602ce3d50d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -352
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "c1e3b29e-6fe6-422a-83be-0b5f503ff295",
      "name": "Run Every X Minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1344,
        176
      ]
    },
    {
      "id": "7c282ce1-a55f-462b-8e8e-e750e93e56c4",
      "name": "Define Search Settings",
      "type": "n8n-nodes-base.set",
      "position": [
        -896,
        96
      ]
    },
    {
      "id": "51c50d90-3255-4ad4-9df8-ae363c30d578",
      "name": "Build Search Filters",
      "type": "n8n-nodes-base.code",
      "position": [
        -672,
        96
      ]
    },
    {
      "id": "8a6c4aa8-efd6-42d7-94ce-4f0bb6ca1bf6",
      "name": "Search People in Apollo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -448,
        96
      ]
    },
    {
      "id": "2735375c-b77d-4731-a8cd-039650a0bbdf",
      "name": "Check if Any People Found",
      "type": "n8n-nodes-base.if",
      "position": [
        -224,
        96
      ]
    },
    {
      "id": "09c1ff30-dc21-458c-bf4a-cda5a8eface1",
      "name": "Process Each Person One by One",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "74f3c36c-8061-4340-841b-80c254b3b19e",
      "name": "Get Person Contact Details",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        224,
        0
      ]
    },
    {
      "id": "beedf603-a9ec-426d-bf06-eebfbe4038bb",
      "name": "Save Person to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        448,
        0
      ]
    },
    {
      "id": "33396597-906e-4f3f-8eb7-1d5a2ea844aa",
      "name": "Mark Company as Processed",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        672,
        0
      ]
    },
    {
      "id": "10da57e6-5e86-4be4-900c-41e18b334c8d",
      "name": "Mark Company as Processed (No Person Found)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        0,
        192
      ]
    },
    {
      "id": "1b0d5877-2481-4b1b-9045-5bc956fd82e2",
      "name": "Pause Before Next Run",
      "type": "n8n-nodes-base.wait",
      "position": [
        224,
        272
      ]
    },
    {
      "id": "cd1b1771-084b-4dd5-91ce-c9a318869bbf",
      "name": "Title Converter",
      "type": "n8n-nodes-base.code",
      "position": [
        -1264,
        -240
      ]
    },
    {
      "id": "3514a5b1-f374-478d-9870-06002bd80e1b",
      "name": "Catch Workflow Error",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -960,
        -240
      ]
    },
    {
      "id": "c283f810-85d4-4438-9112-767f1772b21f",
      "name": "Format Error Message",
      "type": "n8n-nodes-base.code",
      "position": [
        -736,
        -240
      ]
    },
    {
      "id": "d7999a31-37be-4d14-a43c-73a9c200dd67",
      "name": "Send Alert to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -512,
        -240
      ]
    },
    {
      "id": "d3336603-7afa-4a15-ac87-87a62fc77651",
      "name": "Receive Lead (Group 1)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        176,
        -256
      ]
    },
    {
      "id": "ccbcb046-3ceb-496d-9765-89c80dd9a598",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        -352
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "3751fc7a-da17-479e-a6f6-2d9b5cf62b9c",
      "name": "Save Lead Phone to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        -256
      ]
    },
    {
      "id": "250e4cf4-97b9-44fa-823e-78aae48afc2e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1376,
        528
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "7649e4f9-3b3c-4115-acc3-35395c073e11",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        528
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "9d37d548-98a2-46e9-8de3-98532e943773",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        528
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "edeaac58-c1d9-4efe-aea2-bf45eb1204e4",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        528
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "ad71ed51-0f46-4c6a-9ce5-aa98b2b21c07",
      "name": "Notify: Success",
      "type": "n8n-nodes-base.telegram",
      "position": [
        608,
        -256
      ]
    }
  ],
  "connections": {
    "Run Every X Minutes": {
      "main": [
        [
          {
            "node": "Get Apollo Company ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Search Filters": {
      "main": [
        [
          {
            "node": "Search People in Apollo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Catch Workflow Error": {
      "main": [
        [
          {
            "node": "Format Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Error Message": {
      "main": [
        [
          {
            "node": "Send Alert to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Apollo Company ID": {
      "main": [
        [
          {
            "node": "Define Search Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pause Before Next Run": {
      "main": [
        [
          {
            "node": "Get Apollo Company ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Define Search Settings": {
      "main": [
        [
          {
            "node": "Build Search Filters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Lead (Group 1)": {
      "main": [
        [
          {
            "node": "Save Lead Phone to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search People in Apollo": {
      "main": [
        [
          {
            "node": "Check if Any People Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Lead Phone to Sheet": {
      "main": [
        [
          {
            "node": "Notify: Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Any People Found": {
      "main": [
        [
          {
            "node": "Process Each Person One by One",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mark Company as Processed (No Person Found)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Person Contact Details": {
      "main": [
        [
          {
            "node": "Save Person to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Person to Google Sheet": {
      "main": [
        [
          {
            "node": "Mark Company as Processed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Each Person One by One": {
      "main": [
        [
          {
            "node": "Get Person Contact Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark Company as Processed (No Person Found)": {
      "main": [
        [
          {
            "node": "Pause Before Next Run",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}