AutomationFlowsWeb Scraping › Linking Nocodb Records via API

Linking Nocodb Records via API

Original n8n title: Linking Nocodb Records via API 🔗

ByMax aka Mosheh @aiwithapex on n8n.io

How it works: The n8n flow grabs the needed IDs, fetches the current links, adds your new one, and sends a single HTTP request to NocoDB to update the record’s linked entries.

Event trigger★★★★☆ complexity12 nodesNoco DbHTTP Request
Web Scraping Trigger: Event Nodes: 12 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #4070 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "2Pm4HYVtOrq8H0EK",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Linking NocoDB Records via API \ud83d\udd17",
  "tags": [
    {
      "id": "8AEG2zFZndeg1imh",
      "name": "nocodb",
      "createdAt": "2025-05-14T02:58:20.883Z",
      "updatedAt": "2025-05-14T02:58:20.883Z"
    },
    {
      "id": "Y3u7fuGgTL5xyaVG",
      "name": "database db",
      "createdAt": "2025-03-13T10:14:54.572Z",
      "updatedAt": "2025-04-07T06:12:25.593Z"
    }
  ],
  "nodes": [
    {
      "id": "1285cb8b-45ab-4a87-9155-af8e06a195aa",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1888e045-284f-4b1d-b3fd-8ddecc2d5bc2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -140
      ],
      "parameters": {
        "color": 3,
        "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/#tag/Table-Records/operation/db-data-table-row-nested-list\n\n## NocoDB Meta API\nhttps://meta-apis-v2.nocodb.com/\n\n"
      },
      "typeVersion": 1
    },
    {
      "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 \u2014 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 are insignificant\nExample:  MANY Video Productions have MANY Scenes - i.e. You can use scenes in various productions, and you want to keep records where those scenes are being used"
      },
      "typeVersion": 1
    },
    {
      "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 \u2014 the \"starting point\" for the link\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8c028f2f-840c-4287-b6cc-fc6123eff6a7",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1340,
        -140
      ],
      "parameters": {
        "color": 3,
        "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 Data' node>/records/<TARGET TABLE RECORD ID -- see 'Get Target Table Row' node, 'Formula' Column using RECORD_ID()>\n\nBODY (single record):\n[ { \"Id\": <SOURCE TABLE RECORD ID -- see 'Get Source Table Row' node, 'Formula' Column using RECORD_ID()> } ]\n\nBODY (many records from source):\n[\n  { \"Id\": <1st Record ID> },\n  { \"Id\": <2nd Record ID> },\n  ...{ \"Id\": <X Record IDs> },...\n  { \"Id\": <Last Record ID> }\n]\n"
      },
      "typeVersion": 1
    },
    {
      "id": "2d86e7fb-936d-4f4c-8d1d-c6e50fa90a38",
      "name": "Grab Target Table Row",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        440,
        0
      ],
      "parameters": {
        "id": "={{ $json.target_table_row_id }}",
        "table": "mc5ihmltcqfco2v",
        "projectId": "p82se8ug6ui5lt0",
        "authentication": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "699ea454-8841-465b-90d7-d093c4086cff",
      "name": "Set Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        220,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9dd187fd-3957-4549-81ff-1d2190efd711",
              "name": "my_nocodb",
              "type": "string",
              "value": "<Your NocoDB URL, example: nocodb.myserver.com>"
            },
            {
              "id": "cc3e739a-d2ed-498c-bbc4-0f24b1134a87",
              "name": "target_table_id",
              "type": "string",
              "value": "<the ID of TARGET Table, see Video>"
            },
            {
              "id": "dcfdd5d4-4114-46b2-988a-2c10676ceae2",
              "name": "target_table_row_id",
              "type": "string",
              "value": "<the Record-ID of TARGET Table that you want to link to, see Video, example: 5>"
            },
            {
              "id": "e4962b5b-9c62-4c98-ab01-44f7142bf7e3",
              "name": "source_table_row_id",
              "type": "string",
              "value": "<the Record-ID of SOURCE Table that you want to link from, see Video, example: 23>"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a2c900e3-4515-4e9b-a99c-d62014f70c6c",
      "name": "Get Target Table Meta Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        0
      ],
      "parameters": {
        "url": "=https://{{ $('Set Variables').item.json.my_nocodb }}/api/v2/meta/tables/{{ $('Set Variables').item.json.target_table_id }}",
        "options": {},
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        },
        "nodeCredentialType": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ece698e5-29d1-493a-97d3-4ea66ef36e15",
      "name": "Get Source Table Row",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        660,
        0
      ],
      "parameters": {
        "id": "={{ $('Set Variables').item.json.source_table_row_id }}",
        "table": "mm94d1xdbfrn1oe",
        "projectId": "p82se8ug6ui5lt0",
        "authentication": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "bf318290-c151-4eb0-944e-37b66cb69d8e",
      "name": "Link Record from Source to Target",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1100,
        0
      ],
      "parameters": {
        "url": "=https://{{ $('Set Variables').item.json.my_nocodb }}/api/v2/tables/{{ $('Set Variables').item.json.target_table_id }}/links/{{ $('Get Target Table Meta Data').item.json.columns[11].id }}/records/{{ $('Grab Target Table Row').item.json['Record ID'] }}",
        "method": "POST",
        "options": {},
        "jsonBody": "=[ { \"Id\": {{ $('Get Source Table Row').item.json['Record ID'] }} } ]",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "nodeCredentialType": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "993d1c7c-c7fc-49af-b046-4a9a87351799",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        280
      ],
      "parameters": {
        "color": 5,
        "width": 560,
        "height": 80,
        "content": "## Video Guide: https://youtu.be/-srzNushUsk"
      },
      "typeVersion": 1
    },
    {
      "id": "3eaf41c0-235f-4f29-82a4-d875d1dcb9d0",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        190,
        -40
      ],
      "parameters": {
        "color": 2,
        "width": 160,
        "height": 200,
        "content": "### Set These!\n\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "0c26a980-72d0-4c49-941a-8c555ca94b08",
  "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 \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Set Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

How it works: The n8n flow grabs the needed IDs, fetches the current links, adds your new one, and sends a single HTTP request to NocoDB to update the record’s linked entries.

Source: https://n8n.io/workflows/4070/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

Find Top Keywords. Uses nocoDb, httpRequest. Event-driven trigger; 36 nodes.

Noco Db, HTTP Request
Web Scraping

Email-Finder. Uses nocoDb, httpRequest, hunter. Event-driven trigger; 15 nodes.

Noco Db, HTTP Request, Hunter
Web Scraping

This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t

Execute Command, Read Write File, HTTP Request +3
Web Scraping

[n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration. Uses splitInBatches, stickyNote, httpRequest, html. Event-driven trigger; 56 nodes.

HTTP Request, GitHub, Stop And Error +1
Web Scraping

[](https://youtu.be/c7yCZhmMjtI)

HTTP Request, GitHub, Stop And Error +1