{
  "name": "Linking NocoDB records via API 🔗",
  "nodes": [
    {
      "id": "1285cb8b-45ab-4a87-9155-af8e06a195aa",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "1888e045-284f-4b1d-b3fd-8ddecc2d5bc2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -140
      ],
      "parameters": {
        "width": 260,
        "height": 580,
        "content": "# NocoDB Many to Many Link Record\n\n## API POST to Link Records\nhttp://localhost:8080/api/v2/tables/{tableId}/links/{linkFieldId}/records/{recordId}\n\n## NocoDB Data API\nhttps://data-apis-v2.nocodb.com/"
      }
    },
    {
      "id": "6f9aac5b-e767-44bc-aba9-12b80500da78",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -460
      ],
      "parameters": {
        "width": 220,
        "height": 620,
        "content": "### Target Table\n\nThis is the table you are linking to — the \"destination\"\n\n#### Example I Show:\nONE Video Production (Target) is linked to MANY Scenes (Source)\n\n#### Many to Many - Target and Source "
      }
    },
    {
      "id": "6adaeec0-ab7b-4dca-8147-0801f0a215f8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        -120
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "### Source Table (Many)\n\nThis is where the link field lives — the \"starting point\" for the link\n\n"
      }
    },
    {
      "id": "8c028f2f-840c-4287-b6cc-fc6123eff6a7",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1340,
        -140
      ],
      "parameters": {
        "width": 440,
        "height": 440,
        "content": "## In Other Words\n\nPOST:\nhttps://<YOUR NOCODB URL -- see 'Set Variables' node>/api/v2/tables/<TARGET TABLE ID -- see 'Set Variables' node>/links/<TARGET TABLE COLUMN ID -- see 'Get Target Table Meta D"
      }
    },
    {
      "id": "2d86e7fb-936d-4f4c-8d1d-c6e50fa90a38",
      "name": "Grab Target Table Row",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        440,
        0
      ]
    },
    {
      "id": "699ea454-8841-465b-90d7-d093c4086cff",
      "name": "Set Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        220,
        0
      ]
    },
    {
      "id": "a2c900e3-4515-4e9b-a99c-d62014f70c6c",
      "name": "Get Target Table Meta Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        0
      ]
    },
    {
      "id": "ece698e5-29d1-493a-97d3-4ea66ef36e15",
      "name": "Get Source Table Row",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        660,
        0
      ]
    },
    {
      "id": "bf318290-c151-4eb0-944e-37b66cb69d8e",
      "name": "Link Record from Source to Target",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1100,
        0
      ]
    },
    {
      "id": "993d1c7c-c7fc-49af-b046-4a9a87351799",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        280
      ],
      "parameters": {
        "width": 560,
        "height": 80,
        "content": "## Video Guide: https://youtu.be/-srzNushUsk"
      }
    },
    {
      "id": "3eaf41c0-235f-4f29-82a4-d875d1dcb9d0",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        190,
        -40
      ],
      "parameters": {
        "width": 160,
        "height": 200,
        "content": "### Set These!\n\n\n"
      }
    }
  ],
  "connections": {
    "Set Variables": {
      "main": [
        [
          {
            "node": "Grab Target Table Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Source Table Row": {
      "main": [
        [
          {
            "node": "Get Target Table Meta Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Grab Target Table Row": {
      "main": [
        [
          {
            "node": "Get Source Table Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Target Table Meta Data": {
      "main": [
        [
          {
            "node": "Link Record from Source to Target",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Set Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}