Hello,
I'm encountering an issue when trying to update a row in Airtable using its row ID.
My current process involves:
1. Listing records to retrieve the ID and all associated data.
2. Checking if the name field matches "LE CORRE-HEURTIN".
3. Modifying the numeroRPPS
field to 1
.
4. Updating only the numeroRPPS
field for that specific record using its row ID.
Here's my workflow:
Unfortunately, the Airtable update node does not seem to be sending the correct data, as the numeroRPPS
field remains unchanged. Am I missing something? Is there a more streamlined and accurate method to achieve this?
You need to change items[0].json.fields.numeroRPPS = 1
to items[0].json.numeroRPPS = 1
Also, you might want to replace the function node with a set node. Check the example below:
json
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"operation": "list",
"application": "appl8VT0U5WSVMlQN",
"table": "pharmaciens",
"additionalOptions": {}
},
"name": "Airtable",
"type": "n8n-nodes-base.airtable",
"typeVersion": 1,
"position": [
540,
330
],
"credentials": {
"airtableApi": "Airtable Credentials"
}
},
{
"parameters": {
"operation": "update",
"application": "={{$node["Airtable"].parameter["application"]}}",
"table": "={{$node["Airtable"].parameter["table"]}}",
"id": "={{$node["Function"].json["id"]}}",
"updateAllFields": false,
"fields": [
"numeroRPPS"
],
"options": {}
},
"name": "Airtable2",
"type": "n8n-nodes-base.airtable",
"typeVersion": 1,
"position": [
1120,
150
],
"credentials": {
"airtableApi": "Airtable Credentials"
}
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$node["Airtable"].json["fields"]["nom"]}}",
"value2": "LE CORRE-HEURTIN"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
740,
330
]
},
{
"parameters": {},
"name": "NoOp",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
930,
430
]
},
{
"parameters": {
"values": {
"string": [],
"number": [
{
"name": "numeroRPPS",
"value": 1
}
]
},
"options": {}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
920,
220
]
}
],
"connections": {
"Airtable": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
],
[
{
"node": "NoOp",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Airtable2",
"type": "main",
"index": 0
}
]
]
}
}
}
I attempted to use the Set node, but I'm still unable to update the value.
In the Airtable node, I require the row's ID, which I'm obtaining from the IF node (this is the last node with this information because I'm using "keep only set" in the Set node).
I encountered the following error:
ERROR: Airtable error response [INVALIDVALUEFOR_COLUMN]: Field “numeroRPPS” cannot accept the provided value
Error: Airtable error response [INVALID_VALUE_FOR_COLUMN]: Field "numeroRPPS" cannot accept the provided value
at Object.apiRequest (/usr/local/lib/node_modules/callin.io/node_modules/callin.io-nodes-base/dist/nodes/Airtable/GenericFunctions.js:35:23)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Object.execute (/usr/local/lib/node_modules/callin.io/node_modules/callin.io-nodes-base/dist/nodes/Airtable/Airtable.node.js:516:32)
at async /usr/local/lib/node_modules/callin.io/node_modules/callin.io-core/dist/src/WorkflowExecute.js:395:47
Here's my workflow:
I don't understand this message, as the value format appears to be correct (11 digits).
Could you share a screenshot of the output from the Set node? Also, what is the data type of the numeroRPPS
field in Airtable?
Confirmed. No further errors. However, the numeroRPPS field remains unchanged.
I'm questioning whether the process is transmitting the correct data, as this is the output from the update node:
There is no record of the "numeroRPPS" set to "11111111111" as specified in the set node.
I just checked, and it appears the API call for updating records has been modified. I'm looking into it and will provide updates.
The issue has been resolved. We will notify you upon its release.
https://github.com/n8n-io/n8n/pull/1532/commits/acb03c494c786df67ca7566e97aaafa6256c8780
Thank you very much.