{
  "name": "Sync Google Sheets contacts to SeaTable with update/insert logic",
  "nodes": [
    {
      "id": "9c61b9c6-8bfc-4a93-9a00-8c58211d19c0",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -960,
        640
      ]
    },
    {
      "id": "1211014d-547c-4bef-b164-3f89599e2356",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -288,
        640
      ]
    },
    {
      "id": "8cf9862f-edf3-459d-a953-3c9245cf97c0",
      "name": "Replace Me",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -64,
        368
      ]
    },
    {
      "id": "f52c74d9-8523-45e5-8456-88c8e34d0f65",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        160,
        560
      ]
    },
    {
      "id": "7ed9293d-36ab-4010-9c17-e887d6fb4c76",
      "name": "seatablelookup",
      "type": "n8n-nodes-base.seaTable",
      "position": [
        -64,
        560
      ]
    },
    {
      "id": "3423e503-7818-40a9-a244-ff34e47803a2",
      "name": "Create a row",
      "type": "n8n-nodes-base.seaTable",
      "position": [
        384,
        640
      ]
    },
    {
      "id": "c0db351e-4c38-4f30-a532-71102834c3f4",
      "name": "Update a row",
      "type": "n8n-nodes-base.seaTable",
      "position": [
        384,
        832
      ]
    },
    {
      "id": "6a21c5d9-a021-4c07-8f23-bbff08cdb5c1",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -736,
        1056
      ]
    },
    {
      "id": "4d17f737-3b7e-46e4-9024-7648cc7ee4c7",
      "name": "contacts",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -512,
        640
      ]
    },
    {
      "id": "16a0a6b7-f105-4c8b-9ec0-c1472fee0630",
      "name": "settings",
      "type": "n8n-nodes-base.set",
      "position": [
        -736,
        640
      ]
    },
    {
      "id": "8f0cbb8a-e570-4e8c-90c9-029326d69a5f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        512
      ],
      "parameters": {
        "width": 192,
        "height": 96,
        "content": "Set the Google Sheet ID you want to use"
      }
    },
    {
      "id": "a59171ae-873a-4c1d-9be6-7bd4a15be1a6",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        512
      ],
      "parameters": {
        "width": 192,
        "height": 96,
        "content": "\n[Google Sheet Template](https://docs.google.com/spreadsheets/d/1mFKp3wmbV9qp2tpGGsN72zdiC32y8H1nhjdgP885y-U/edit?usp=sharing)\n\n"
      }
    },
    {
      "id": "2b104909-8608-4165-966b-7edf96b717e3",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        144
      ],
      "parameters": {
        "width": 608,
        "height": 848,
        "content": "# Keep your Google Sheets contacts in sync with SeaTable\nUpdate or Insert records in SeaTable\n\n## How it works\n\n- The Google Sheet is your list of contacts to be inserted or updated in SeaTable.\n- For"
      }
    },
    {
      "id": "65ef3bb5-2721-4ca6-9860-45644d2fd8e0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        864
      ],
      "parameters": {
        "width": 576,
        "height": null,
        "content": "# Create Table via API \n\n### (use the Bearer YOUR_TOKEN_HERE)\nhttps://api.seatable.com/reference/createtable\n\n### Get Base Token produce Bearer (access-token)\nhttps://api.seatable.com/reference/getbas"
      }
    },
    {
      "id": "c74be35d-a5b6-48f9-89b0-3b13b198f813",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -960,
        1056
      ]
    },
    {
      "id": "7abce5a9-f386-4006-974f-76d2405bd97f",
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -928,
        288
      ]
    },
    {
      "id": "e437af5a-6ba3-4dac-802c-37296987b67c",
      "name": "Edit Fields2",
      "type": "n8n-nodes-base.set",
      "position": [
        -704,
        288
      ]
    },
    {
      "id": "a2f3b7ca-c6df-4f4d-b701-6ca8b9029db2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        176
      ],
      "parameters": {
        "width": 576,
        "height": 288,
        "content": "# Get Server Info\n"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Create a row",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update a row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "contacts": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "settings": {
      "main": [
        [
          {
            "node": "contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me": {
      "main": [
        []
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a row": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        []
      ]
    },
    "Update a row": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "seatablelookup": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "seatablelookup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}