N
n8n Store
Workflow Market
Airtable to HubSpot v4.0

Airtable to HubSpot v4.0

by ehsan-zβ€’0 views

Description

Categories

βš™οΈ Automation

Nodes Used

n8n-nodes-base.ifn8n-nodes-base.setn8n-nodes-base.noOpn8n-nodes-base.noOpn8n-nodes-base.noOpn8n-nodes-base.mergen8n-nodes-base.hubspotn8n-nodes-base.hubspotn8n-nodes-base.hubspotn8n-nodes-base.airtable
PriceGratuit
Views0
Last Updated11/28/2025
workflow.json
{
  "id": "yfXzYU65OfyVkpBT",
  "meta": {
    "instanceId": "e21631593c665e575c87e460dd8681c44b1aaa7afc3347cf8214a1b5119341f4",
    "templateCredsSetupCompleted": true
  },
  "name": "Airtable to HubSpot v4.0",
  "tags": [],
  "nodes": [
    {
      "id": "a5a2f6d8-ce49-44f4-87b5-6af910b648a3",
      "name": "get domain",
      "type": "n8n-nodes-base.set",
      "position": [
        816,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c031b010-4ea5-4ba0-be21-3cd40cc7f53b",
              "name": "domain",
              "type": "string",
              "value": "={{ $json.fields.Email.split('@')[1] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "91594f3f-855d-48cc-810a-efb7431dc7fa",
      "name": "Search company",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1056,
        0
      ],
      "parameters": {
        "domain": "=https://{{ $json.domain }}",
        "options": {},
        "resource": "company",
        "operation": "searchByDomain",
        "authentication": "appToken"
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "itqxhGQVEYECzVCD",
          "name": "HubSpot App Token account"
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": true
    },
    {
      "id": "13fa19e4-67e3-498d-91cd-52e8da8cab95",
      "name": "Create a company",
      "type": "n8n-nodes-base.hubspot",
      "onError": "continueErrorOutput",
      "position": [
        1456,
        272
      ],
      "parameters": {
        "name": "={{ $('get πŸ‘Ready to Sync').item.json['Company Name'] }}",
        "resource": "company",
        "authentication": "appToken",
        "additionalFields": {
          "websiteUrl": "=http://{{ $('get domain').item.json.domain }}",
          "companyDomainName": "={{ $('get domain').item.json.domain }}"
        }
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "itqxhGQVEYECzVCD",
          "name": "HubSpot App Token account"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6d158464-71dc-41c7-b1e3-bdd857c40060",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "onError": "continueErrorOutput",
      "position": [
        1680,
        -32
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "2a792790-07c4-4101-846e-fe8d6fe37c5b",
      "name": "Create or update a contact",
      "type": "n8n-nodes-base.hubspot",
      "onError": "continueErrorOutput",
      "position": [
        1952,
        -48
      ],
      "parameters": {
        "email": "={{ $('get πŸ‘Ready to Sync').item.json.Email }}",
        "options": {
          "resolveData": false
        },
        "authentication": "appToken",
        "additionalFields": {
          "jobTitle": "={{ $('get πŸ‘Ready to Sync').item.json['Job Title'] }}",
          "firstName": "={{ $('get πŸ‘Ready to Sync').item.json.Name }}",
          "associatedCompanyId": "={{ $('Merge').item.json.companyId }}"
        }
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "itqxhGQVEYECzVCD",
          "name": "HubSpot App Token account"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "af848f9f-b36b-41fe-865a-59c805048b37",
      "name": "Sync back",
      "type": "n8n-nodes-base.airtable",
      "onError": "continueErrorOutput",
      "position": [
        2224,
        -64
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appthZgrzxKzQPEYa",
          "cachedResultUrl": "https://airtable.com/appthZgrzxKzQPEYa",
          "cachedResultName": "Sales Lead Pipeline"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblOawCD1qbUtJssh",
          "cachedResultUrl": "https://airtable.com/appthZgrzxKzQPEYa/tblOawCD1qbUtJssh",
          "cachedResultName": "Table 1"
        },
        "columns": {
          "value": {
            "id": "={{ $('get πŸ‘Ready to Sync').item.json.id }}",
            "Note": "=Successfully synced with HubSpot on {{ $now }}",
            "Status": "βœ… Synced",
            "HubSpot Company ID": "={{ $('Merge').item.json.companyId.toString() }}",
            "HubSpot Contact ID": "={{ $('Create or update a contact').item.json.vid.toString() }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Job Title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Job Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "πŸ“₯ New Lead",
                  "value": "πŸ“₯ New Lead"
                },
                {
                  "name": "πŸ‘ Ready to Sync",
                  "value": "πŸ‘ Ready to Sync"
                },
                {
                  "name": "πŸ”„ Syncing...",
                  "value": "πŸ”„ Syncing..."
                },
                {
                  "name": "βœ… Synced",
                  "value": "βœ… Synced"
                },
                {
                  "name": "❌ Error",
                  "value": "❌ Error"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "HubSpot Contact ID",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "HubSpot Contact ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "HubSpot Company ID",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "HubSpot Company ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Note",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last modified time",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last modified time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "typecast": true
        },
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "YrTFaDnz1wrlC7rU",
          "name": "Airtable Personal Access Token account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e48f0037-5055-4059-8616-7ea6bb39d849",
      "name": "Report Failure",
      "type": "n8n-nodes-base.airtable",
      "onError": "continueRegularOutput",
      "position": [
        2464,
        224
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appthZgrzxKzQPEYa",
          "cachedResultUrl": "https://airtable.com/appthZgrzxKzQPEYa",
          "cachedResultName": "Sales Lead Pipeline"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblOawCD1qbUtJssh",
          "cachedResultUrl": "https://airtable.com/appthZgrzxKzQPEYa/tblOawCD1qbUtJssh",
          "cachedResultName": "Table 1"
        },
        "columns": {
          "value": {
            "id": "={{ $('get πŸ‘Ready to Sync').item.json.id }}",
            "Note": "={{ $now }}\n{{ $json.toJsonString() }}",
            "Status": "❌ Error",
            "HubSpot Company ID": "=",
            "HubSpot Contact ID": "="
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Job Title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Job Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "πŸ“₯ New Lead",
                  "value": "πŸ“₯ New Lead"
                },
                {
                  "name": "πŸ‘ Ready to Sync",
                  "value": "πŸ‘ Ready to Sync"
                },
                {
                  "name": "πŸ”„ Syncing...",
                  "value": "πŸ”„ Syncing..."
                },
                {
                  "name": "βœ… Synced",
                  "value": "βœ… Synced"
                },
                {
                  "name": "❌ Error",
                  "value": "❌ Error"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "HubSpot Contact ID",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "HubSpot Contact ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "HubSpot Company ID",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "HubSpot Company ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Note",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Note",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last modified time",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last modified time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "YrTFaDnz1wrlC7rU",
          "name": "Airtable Personal Access Token account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "d276bbe1-be3a-4bf2-9c49-83e57d7649de",
      "name": "change status to Syncing...",
      "type": "n8n-nodes-base.airtable",
      "position": [
        576,
        0
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appthZgrzxKzQPEYa",
          "cachedResultUrl": "https://airtable.com/appthZgrzxKzQPEYa",
          "cachedResultName": "Sales Lead Pipeline"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblOawCD1qbUtJssh",
          "cachedResultUrl": "https://airtable.com/appthZgrzxKzQPEYa/tblOawCD1qbUtJssh",
          "cachedResultName": "Table 1"
        },
        "columns": {
          "value": {
            "id": "={{ $json.id }}",
            "Status": "πŸ”„ Syncing..."
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Job Title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Job Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "πŸ“₯ New Lead",
                  "value": "πŸ“₯ New Lead"
                },
                {
                  "name": "πŸ‘ Ready to Sync",
                  "value": "πŸ‘ Ready to Sync"
                },
                {
                  "name": "πŸ”„ Syncing...",
                  "value": "πŸ”„ Syncing..."
                },
                {
                  "name": "βœ… Synced",
                  "value": "βœ… Synced"
                },
                {
                  "name": "❌ Error",
                  "value": "❌ Error"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "HubSpot Contact ID",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "HubSpot Contact ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "HubSpot Company ID",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "HubSpot Company ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last modified time",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last modified time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "YrTFaDnz1wrlC7rU",
          "name": "Airtable Personal Access Token account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "d9d0b7be-58f2-494a-80d9-6dd58519262f",
      "name": "If company exists",
      "type": "n8n-nodes-base.if",
      "position": [
        1280,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "565d12da-611e-4bf0-ba10-b53fed65335a",
              "operator": {
                "type": "number",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.companyId }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "878ae011-4714-4e8c-b19b-f65cb8615a5b",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -192,
        368
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "seconds",
              "secondsInterval": 20
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "43d1bacc-9974-48ce-8db7-50c31d43ec03",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        336,
        368
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "f387807a-1ec5-4c9a-bd8d-6d67a2ac278a",
      "name": "πŸŽ‰All Records Completed!πŸŽ‰",
      "type": "n8n-nodes-base.noOp",
      "position": [
        544,
        -256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9e72bd78-4377-4767-8077-6c8c89fd0cec",
      "name": "πŸ‘Done! Going for next record",
      "type": "n8n-nodes-base.noOp",
      "position": [
        3024,
        320
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "eec0e289-05e3-4813-9dc6-d88a3e922fd4",
      "name": "πŸ‘ŽFailed! Going for next record1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2688,
        288
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "38da10fa-535e-4d18-8c88-27058581f3b9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        -48
      ],
      "parameters": {
        "width": 576,
        "height": 896,
        "content": "## πŸš€ Welcome! \n## Batch-sync approved leads from Airtable to HubSpot\n\nThis template solves a common business problem: **how to get leads from a simple \"control panel\" (Airtable) into your CRM (HubSpot) in a robust, error-proof way.**\n\nThis is a \"Human-in-the-Loop\" workflow: you approve a lead in Airtable, and n8n handles the rest.\n\n### What it does (v3.0):\n* **Polls** Airtable for new leads (every 20 sec).\n* **Fetches up to 50 leads** at a time in a batch.\n* **Loops** through each lead, one by one.\n* βœ… **Finds or Creates a Company** (based on email domain).\n* βœ… **Creates or Updates a Contact** (based on email).\n* βœ… **Associates** that Contact with that Company.\n* βœ… **Writes** the new HubSpot IDs back to Airtable for a 2-way sync.\n* ❌ **Catches errors** per-item, logs them, and continues the loop.\n\n---\n\n### πŸ’‘ Get Started in 3 Steps\n\n**1. Get Your Airtable Base**\n* This workflow requires a specific Airtable structure. **You can copy my exact template base:**\n* ➑️ **[Click Here to Copy the Airtable Base](https://airtable.com/appthZgrzxKzQPEYa/shrRoRtIXoL1tlDVv)**\n* (First time using Airtable? [Sign up here](https://airtable.com/invite/r/Isr7G94S))\n\n**2. Get Your HubSpot Account**\n* This workflow runs best with a **free HubSpot Developer Sandbox**.\n* This lets you test everything with zero risk.\n\n**3. Set Your n8n Credentials**\n* This template needs **two** credentials to work.\n* **Video Guide:** [How to Connect Airtable to n8n](https://www.youtube.com/watch=v_xFFfkBeI2rQ)\n* **Video Guide:** [How to Connect HubSpot to n8n (Private Apps)](https://www.youtube.com/watch=v_KzP52kRsRrk)\n\n**Now, just follow the \"Step\" notes!**"
      },
      "typeVersion": 1
    },
    {
      "id": "0c1834b4-8429-4e92-8c86-6164ac8acae0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        368
      ],
      "parameters": {
        "color": 6,
        "width": 304,
        "height": 480,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## Step 1: Set Your Schedule\n\nThis is a **polling trigger**. It checks for new leads on a timer. I've set it to **20 seconds** for testing.\n\n> **Your Action:**\n> For a real-world setup, you can change this to run every **5 Minutes** or **1 Hour**, depending on your needs."
      },
      "typeVersion": 1
    },
    {
      "id": "4494c108-2a65-4205-96ee-7f7408350526",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        368
      ],
      "parameters": {
        "color": 6,
        "width": 304,
        "height": 480,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n## Step 2: Configure Airtable\n\nThis node **fetches a batch of up to 50 leads** from the **\"πŸ‘ Ready to Sync\"** view.\n\n> **Your Action:**\n> 1.  Select your Airtable credential.\n> 2.  In the **'Base'** field, find and select the Airtable base you copied.\n> 3.  The **'View'** field should be **'πŸ‘ Ready to Sync'**."
      },
      "typeVersion": 1
    },
    {
      "id": "a177f922-1888-49ff-a8a5-0b73eba18f8c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        368
      ],
      "parameters": {
        "color": 5,
        "width": 464,
        "height": 480,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n## Logic: The Batch Engine βš™οΈ\n\nThis is the *engine* of your batch system. It takes the 50 records from the previous step and processes them **one at a time**.\n\n* The **top output** (`No Items`) runs when the batch is empty.\n* The **bottom output** (`Next Item`) sends one record to the rest of the workflow.\n\n*No configuration is needed here.*"
      },
      "typeVersion": 1
    },
    {
      "id": "aa3f39c3-df1b-4ed2-adba-18c7cae0c121",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -544
      ],
      "parameters": {
        "color": 4,
        "width": 464,
        "height": 464,
        "content": "## All Done!\n\nThis node marks the end of a *poll cycle* where no records (or no more records) were found.\n\nThe workflow will now wait for the next `Schedule Trigger`."
      },
      "typeVersion": 1
    },
    {
      "id": "a69b124c-16a9-4561-8da1-b0fa14b99e70",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -32
      ],
      "parameters": {
        "color": 5,
        "width": 464,
        "height": 384,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## Logic: Lock the Record πŸ”’\n\nThis is a professional safeguard. It immediately sets the *current* record's status to **'πŸ”„ Syncing...'**\n\n**Why?** This prevents the *next* poll cycle from grabbing this same record again.\n\n*No configuration is needed here.*"
      },
      "typeVersion": 1
    },
    {
      "id": "419a0292-5128-4a7c-83f1-54271c72fad8",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        -288
      ],
      "parameters": {
        "color": 5,
        "width": 224,
        "height": 448,
        "content": "## Logic: Helper Node\n\nThis node simply takes the email (`[email protected]`) and splits it to keep *only* the domain (`company.com`).\n\nThis domain is used in the next step to search for the company."
      },
      "typeVersion": 1
    },
    {
      "id": "180f5e90-932e-4aa5-8369-51bd5c5b3fa1",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        992,
        -416
      ],
      "parameters": {
        "color": 6,
        "width": 256,
        "height": 576,
        "content": "## Step 3: Configure HubSpot\n\nThis is the *first* HubSpot node, so you must set your credential here.\n\n> **Your Action:**\n> 1.  Select your HubSpot Private App credential.\n\n---\n### This Node's Logic (The \"Find\")\n\nThis is the \"Find\" part of our \"Find or Create\" logic. It searches HubSpot for a company matching the domain."
      },
      "typeVersion": 1
    },
    {
      "id": "501e1fab-9ae2-4cfc-bfa1-2668af24b630",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1264,
        -512
      ],
      "parameters": {
        "color": 5,
        "width": 304,
        "height": 960,
        "content": "## Logic: Check if Company Was Found\n\nThe `Search company` node is configured to output a *company object* directly (not a \"total\" or \"results\" list).\n>\n> * **If a company is found:** It outputs the object, `companyId` exists, and the `True` path runs.\n> * **If no company is found:** It outputs an *empty* item, `companyId` is empty, and the `False` path runs (to create a company).\n>\n"
      },
      "typeVersion": 1
    },
    {
      "id": "e433f6b3-b2b6-49db-8423-7debfbbd2520",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        -416
      ],
      "parameters": {
        "color": 5,
        "width": 272,
        "height": 576,
        "content": "## Logic: Combine Paths\n\nThis node brings the `true` (Find) and `false` (Create) paths back together.\n\nAfter this node, the workflow has a single, valid `companyId` to work with, no matter which path it took."
      },
      "typeVersion": 1
    },
    {
      "id": "a5b9f18c-20b8-4694-875e-19063ce94795",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        -288
      ],
      "parameters": {
        "color": 5,
        "height": 448,
        "content": "## Logic: Create/Update Contact πŸ§‘β€πŸ’Ό\n\nThis node uses the contact's email as a unique key to create or update their record."
      },
      "typeVersion": 1
    },
    {
      "id": "09540b53-61b4-40d2-8773-62a74bba2ed5",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2128,
        -256
      ],
      "parameters": {
        "color": 4,
        "width": 256,
        "height": 416,
        "content": "## Success: Sync to Airtable βœ…\n\nThis is the final \"feedback loop\" for a successful run."
      },
      "typeVersion": 1
    },
    {
      "id": "5c302134-cb3f-4477-9b3a-a897d9930fbc",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2400,
        -192
      ],
      "parameters": {
        "color": 3,
        "height": 640,
        "content": "## Error Handling ❌\n\nThis node *only* runs if something fails in the main sync. It updates the Airtable row, sets `Status` to **'❌ Error'**, and posts the error message in the **'Note'** field."
      },
      "typeVersion": 1
    },
    {
      "id": "3f42c342-5dfb-40ae-a5fd-4d9521b7bb35",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        -48
      ],
      "parameters": {
        "color": 7,
        "width": 1120,
        "height": 896,
        "content": "## Get Data \n"
      },
      "typeVersion": 1
    },
    {
      "id": "fff64536-4dab-4072-8621-8ee467eaf05b",
      "name": "get πŸ‘Ready to Sync",
      "type": "n8n-nodes-base.airtable",
      "position": [
        48,
        368
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appthZgrzxKzQPEYa",
          "cachedResultUrl": "https://airtable.com/appthZgrzxKzQPEYa",
          "cachedResultName": "Sales Lead Pipeline"
        },
        "limit": 50,
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblOawCD1qbUtJssh",
          "cachedResultUrl": "https://airtable.com/appthZgrzxKzQPEYa/tblOawCD1qbUtJssh",
          "cachedResultName": "Table 1"
        },
        "options": {
          "view": {
            "__rl": true,
            "mode": "list",
            "value": "viw8grH6AMLgjOaEN",
            "cachedResultUrl": "https://airtable.com/appthZgrzxKzQPEYa/tblOawCD1qbUtJssh/viw8grH6AMLgjOaEN",
            "cachedResultName": "βœ… Ready to Sync"
          }
        },
        "operation": "search",
        "returnAll": false
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "YrTFaDnz1wrlC7rU",
          "name": "Airtable Personal Access Token account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "75a7b2a8-84e0-4142-82bb-4fb36e96b07a",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        -576
      ],
      "parameters": {
        "color": 7,
        "width": 672,
        "height": 1424,
        "content": "## PROCESS...\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a22fac4c-bc93-4471-b82f-8ce36de1af3d",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        -576
      ],
      "parameters": {
        "color": 7,
        "width": 1216,
        "height": 1424,
        "content": "## OUTPUT\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cfe8b8b8-5828-4292-9250-eb4e1f49ae45",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2672,
        -576
      ],
      "parameters": {
        "color": 7,
        "width": 672,
        "height": 1424,
        "content": "## GOING BACK TO START THE NEXT⬅️"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5b7010a5-3026-4094-8572-c20edb34e356",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Create or update a contact",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Report Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync back": {
      "main": [
        [
          {
            "node": "πŸ‘Done! Going for next record",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Report Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get domain": {
      "main": [
        [
          {
            "node": "Search company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Report Failure": {
      "main": [
        [
          {
            "node": "πŸ‘ŽFailed! Going for next record1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search company": {
      "main": [
        [
          {
            "node": "If company exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "πŸŽ‰All Records Completed!πŸŽ‰",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "change status to Syncing...",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a company": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "Report Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "get πŸ‘Ready to Sync",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If company exists": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create a company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get πŸ‘Ready to Sync": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create or update a contact": {
      "main": [
        [
          {
            "node": "Sync back",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Report Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "change status to Syncing...": {
      "main": [
        [
          {
            "node": "get domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "πŸ‘Done! Going for next record": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "πŸ‘ŽFailed! Going for next record1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

η›Έε…³ε·₯作桁