Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NocoDB node error when update row #12777

Open
marcalorri opened this issue Jan 22, 2025 · 3 comments
Open

NocoDB node error when update row #12777

marcalorri opened this issue Jan 22, 2025 · 3 comments
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@marcalorri
Copy link

marcalorri commented Jan 22, 2025

Describe the problem/error/question

NocoDB node error when update row

What is the error message (if any)?

Your request is invalid or could not be processed by the service
Primary key is required

Please share your workflow/screenshots/recording

{
"nodes": [
{
"parameters": {
"fieldToSplitOut": "places",
"options": {}
},
"id": "ef1c8615-2801-4d9d-a330-46925617c9b7",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1,
"position": [
740,
540
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "8509fe6c-d2c1-42d7-bae3-7803172c4340",
"name": "place_id",
"value": "={{ $json.id }}",
"type": "string"
}
]
},
"options": {}
},
"id": "f592f271-7411-4932-a996-77bf490b5726",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
960,
540
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "90e97999-79a6-4b42-a606-f13c73a230dd",
"name": "business_type",
"value": "restaurant",
"type": "string"
}
]
},
"options": {}
},
"id": "79b6d8a5-9049-49c8-bc0a-65544ca04a49",
"name": "Config",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
960,
300
]
},
{
"parameters": {
"options": {}
},
"id": "591896a2-14fb-4d58-8f87-c0e1f83f8a53",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
1180,
540
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "871d69a1-22e2-46fe-a836-25be25c052a6",
"leftValue": "={{ $json.Id }}",
"rightValue": "",
"operator": {
"type": "number",
"operation": "exists",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1640,
640
],
"id": "61a8be67-bde8-4a40-a5c4-41ed3516abc6",
"name": "exist?"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1840,
620
],
"id": "170b7b41-9005-4484-9004-abbf422ca2e9",
"name": "No Operation, do nothing"
},
{
"parameters": {
"authentication": "nocoDbApiToken",
"operation": "create",
"projectId": "pxvtjo9tqnx0mq3",
"table": "mk9gwti3729byob",
"fieldsUi": {
"fieldValues": [
{
"fieldName": "id_gbp",
"binaryData": true,
"binaryProperty": "={{ $json.id_gbp }}"
}
]
}
},
"type": "n8n-nodes-base.nocoDb",
"typeVersion": 3,
"position": [
1840,
820
],
"id": "201c14e0-583a-4e3b-83f8-355beed26b01",
"name": "Save new gbp_id",
"credentials": {
"nocoDbApiToken": {
"id": "QrxigrBAed13tAWA",
"name": "NocoDB Token BDM Server"
}
}
},
{
"parameters": {
"authentication": "nocoDbApiToken",
"operation": "getAll",
"projectId": "pxvtjo9tqnx0mq3",
"table": "mk9gwti3729byob",
"options": {
"where": "=(id_gbp,eq,{{ $json.place_id }})"
}
},
"type": "n8n-nodes-base.nocoDb",
"typeVersion": 3,
"position": [
1440,
640
],
"id": "d9c9e8ef-bdc6-4a8a-b38c-bff8fbc6f8d1",
"name": "Search gbp_id",
"alwaysOutputData": true,
"credentials": {
"nocoDbApiToken": {
"id": "QrxigrBAed13tAWA",
"name": "NocoDB Token BDM Server"
}
},
"onError": "continueRegularOutput"
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 59
}
]
}
},
"id": "2b5e5813-35cf-4a55-89db-4b77b20eefd3",
"name": "Cada 59 min",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
740,
300
]
},
{
"parameters": {
"authentication": "nocoDbApiToken",
"operation": "update",
"projectId": "pxvtjo9tqnx0mq3",
"table": "mb4r0v038hnwsj6",
"fieldsUi": {
"fieldValues": [
{
"fieldName": "Status",
"fieldValue": "searched"
},
{}
]
}
},
"type": "n8n-nodes-base.nocoDb",
"typeVersion": 3,
"position": [
1640,
480
],
"id": "955c92bb-1eef-43d0-adec-65eec37261cf",
"name": "Mark streeet as searched",
"alwaysOutputData": false,
"credentials": {
"nocoDbApiToken": {
"id": "QrxigrBAed13tAWA",
"name": "NocoDB Token BDM Server"
}
}
},
{
"parameters": {
"authentication": "nocoDbApiToken",
"operation": "getAll",
"projectId": "pxvtjo9tqnx0mq3",
"table": "mb4r0v038hnwsj6",
"limit": 1,
"options": {
"fields": [],
"where": "=(Status,eq,pending)"
}
},
"type": "n8n-nodes-base.nocoDb",
"typeVersion": 3,
"position": [
1180,
300
],
"id": "c6e2883e-1cd7-455b-9c85-9214e2615dbb",
"name": "Next street",
"credentials": {
"nocoDbApiToken": {
"id": "QrxigrBAed13tAWA",
"name": "NocoDB Token BDM Server"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.limit",
"typeVersion": 1,
"position": [
1400,
300
],
"id": "362892a8-0013-4402-945b-cc2f8b9b5289",
"name": "Limit"
},
{
"parameters": {
"method": "POST",
"url": "https://places.googleapis.com/v1/places:searchText",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "X-Goog-Api-Key",
"value": "{API_KEY}"
},
{
"name": "X-Goog-FieldMask",
"value": "places.id"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "textQuery",
"value": "={{ $('Config').item.json.business_type }} in {{ $json.Street }} ,{{ $json.City }}, {{ $json.County }}, {{ $json.State }}"
}
]
},
"options": {
"response": {
"response": {
"responseFormat": "json"
}
},
"pagination": {
"pagination": {
"parameters": {
"parameters": [
{
"name": "next_page_token",
"value": "={{ $response.body["next_page_token"] }}"
}
]
},
"limitPagesFetched": true,
"maxRequests": 3,
"requestInterval": 3000
}
}
}
},
"id": "5f18c2b4-907d-4b9f-b51a-6996d6d7b3bc",
"name": "Search Places ids",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1620,
300
]
}
],
"connections": {
"Split Out": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Config": {
"main": [
[
{
"node": "Next street",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Mark streeet as searched",
"type": "main",
"index": 0
}
],
[
{
"node": "Search gbp_id",
"type": "main",
"index": 0
}
]
]
},
"exist?": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
],
[
{
"node": "Save new gbp_id",
"type": "main",
"index": 0
}
]
]
},
"No Operation, do nothing": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Save new gbp_id": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Search gbp_id": {
"main": [
[
{
"node": "exist?",
"type": "main",
"index": 0
}
]
]
},
"Cada 59 min": {
"main": [
[
{
"node": "Config",
"type": "main",
"index": 0
}
]
]
},
"Mark streeet as searched": {
"main": [
[]
]
},
"Next street": {
"main": [
[
{
"node": "Limit",
"type": "main",
"index": 0
}
]
]
},
"Limit": {
"main": [
[
{
"node": "Search Places ids",
"type": "main",
"index": 0
}
]
]
},
"Search Places ids": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "1d8dee6a015b3a7df99d19bffd6b406f6bd3ae6209c87ba86fc1da4a3f525d8d"
}
}

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Debug info

core

  • n8nVersion: 1.74.3
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.18.1
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: community

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: memory

pruning

  • enabled: true
  • maxAge: 168 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/131.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-01-22T10:37:22.400Z}

@Joffcom
Copy link
Member

Joffcom commented Jan 22, 2025

Hey @marcalorri,

We have created an internal ticket to look into this which we will be tracking as "N8N-8199"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Jan 22, 2025
@marcalorri
Copy link
Author

Also with nocoCB node, the limit on "get many" rows doesn't work too.

@Joffcom
Copy link
Member

Joffcom commented Jan 22, 2025

Hey @marcalorri,

The error coming back from NocoDB is Primary key is required did you remember to include the primary key in your request? With the Get Many issue that is sadly out of our hands and is waiting on a fix from the NocoDB team, You can find more information on this here: nocodb/nocodb#9513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

2 participants