{
  "name": "Enrich LinkedIn profiles in NocoDB CRM with Apify scraper",
  "nodes": [
    {
      "id": "node_0",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        160,
        80
      ]
    },
    {
      "id": "node_1",
      "name": "Get Guests with LinkedIn",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        380,
        180
      ]
    },
    {
      "id": "node_2",
      "name": "Run Apify LinkedIn Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        680,
        180
      ]
    },
    {
      "id": "node_3",
      "name": "Wait for Completion",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        900,
        180
      ]
    },
    {
      "id": "node_4",
      "name": "Check Run Status",
      "type": "n8n-nodes-base.if",
      "position": [
        1120,
        180
      ]
    },
    {
      "id": "node_5",
      "name": "Get Scraper Results",
      "type": "n8n-nodes-base.code",
      "position": [
        1340,
        80
      ]
    },
    {
      "id": "node_7",
      "name": "Transform Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1640,
        -100
      ]
    },
    {
      "id": "node_8",
      "name": "Update Guest Success",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        1860,
        -100
      ]
    },
    {
      "id": "node_9",
      "name": "Clear Broken LinkedIn URL",
      "type": "n8n-nodes-base.code",
      "position": [
        1660,
        260
      ]
    },
    {
      "id": "node_10",
      "name": "Update Guest - Clear URL",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        1880,
        260
      ]
    },
    {
      "id": "node_11",
      "name": "Handle Scraper Error",
      "type": "n8n-nodes-base.code",
      "position": [
        1640,
        620
      ]
    },
    {
      "id": "node_12",
      "name": "Update Guest - Error Status",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        1860,
        620
      ]
    },
    {
      "id": "6356f2e6-a8d3-4d0f-8ac9-22793999d1bf",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        160,
        280
      ]
    },
    {
      "id": "ccaaf658-e84e-47cb-8519-f9547c9bf6eb",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        -220
      ],
      "parameters": {
        "width": 580,
        "height": 320,
        "content": "## Data enrichment flow"
      }
    },
    {
      "id": "142b5d5f-82fe-4f6d-b891-dd2eb1de646f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        140
      ],
      "parameters": {
        "width": 580,
        "height": 320,
        "content": "## Remove 404 linkedin URL"
      }
    },
    {
      "id": "63b77aec-30df-4ee3-843e-57170c36b840",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        500
      ],
      "parameters": {
        "width": 580,
        "height": 320,
        "content": "## Apify error/timeout"
      }
    },
    {
      "id": "ed6d5639-4a83-44de-9b38-a83a9ba3d342",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        120
      ],
      "parameters": {
        "width": 220,
        "height": 240,
        "content": "## Get LinkedIn URL"
      }
    },
    {
      "id": "9d3e30ef-b19a-4a89-b968-a3dcba8e9efa",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        120
      ],
      "parameters": {
        "width": 420,
        "height": 240,
        "content": "## Get LinkedIn profile data"
      }
    },
    {
      "id": "5de302ee-f413-4b95-b14e-677d9d3e793d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        280
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "74ff9c6b-b162-4c0c-a33b-2129b4babe8d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        280
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "1ce6b31d-bdc3-40e1-ab07-4368b410da6e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2180,
        20
      ],
      "parameters": {
        "width": 440,
        "height": 600,
        "content": "## Required fields in NocoDB table:\n\n**Input field:**\n* LinkedIn\n\n**Output fields:**\n* linkedin_url\n* linkedin_full_name\n* linkedin_first_name: \n* linkedin_headline:\n* linkedin_email:\n* linkedin_bio:\n"
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Get Guests with LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transform Data": {
      "main": [
        [
          {
            "node": "Update Guest Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Run Status": {
      "main": [
        [
          {
            "node": "Get Scraper Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Handle Scraper Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Guests with LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Scraper Results": {
      "main": [
        [
          {
            "node": "Transform Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Clear Broken LinkedIn URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Completion": {
      "main": [
        [
          {
            "node": "Check Run Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Handle Scraper Error": {
      "main": [
        [
          {
            "node": "Update Guest - Error Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Guests with LinkedIn": {
      "main": [
        [
          {
            "node": "Run Apify LinkedIn Scraper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clear Broken LinkedIn URL": {
      "main": [
        [
          {
            "node": "Update Guest - Clear URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Apify LinkedIn Scraper": {
      "main": [
        [
          {
            "node": "Wait for Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}