Hello n8n folks - I’m trying to understand the way n8n is attributing data in the set node and more precisely how to attribute data correctly.
- This WF begins with an Airtable contact list where I have the following columns:
ID, first_name, last_name, job_title, email, and deliverability.
→ The deliverability remains empty at this stage. - Then I simulated a GET request from an API that return the email deliverability. (Yes OR No)
- I have a set node to attribute an ID to the contact, to prepare the matching for the next update node
- Airtable update - Update the deliverability status according to the ID
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
240,
300
]
},
{
"parameters": {
"operation": "update",
"application": "app50gSeeN39EmTFf",
"table": "Contacts",
"id": "={{$json[\"id\"]}}",
"options": {}
},
"name": "Airtable",
"type": "n8n-nodes-base.airtable",
"typeVersion": 1,
"position": [
960,
300
],
}
}
},
{
"parameters": {
"values": {
"string": [
{
"name": "deliverability",
"value": "={{$json[\"deliverability\"]}}"
},
{
"name": "id",
"value": "={{$node[\"Airtable1\"].json[\"id\"]}}"
}
]
},
"options": {}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
760,
300
]
},
{
"parameters": {
"operation": "list",
"application": "app50gSeeN39EmTFf",
"table": "Contacts",
"additionalOptions": {}
},
"name": "Airtable1",
"type": "n8n-nodes-base.airtable",
"typeVersion": 1,
"position": [
400,
300
],
}
},
{
"parameters": {
"functionCode": "return [{\n\n\t\t\"email\": \"[email protected]\",\n\t\t\"deliverability\" :\"NO\"\n},\n{\n\t\t\"email\": \"[email protected]\",\n\t\t\"deliverability\" :\"YES\"\n}\n]\n\n"
},
"name": "Email_Deliverability",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
580,
300
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Airtable1",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Airtable",
"type": "main",
"index": 0
}
]
]
},
"Airtable1": {
"main": [
[
{
"node": "Email_Deliverability",
"type": "main",
"index": 0
}
]
]
},
"Email_Deliverability": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
}
}
}
Results:
A mismatch between contact and ID.
Screenshot from Airtable:
Screenshot from the set node:
In fact, Mario was supposed to have the following “id”: “recvpdoOS5rikqyLa” - but after the set node, Mario has the following: “id”: "recOuSNTLUGTWqxXo and that results in a wrong Deliverability attribution.
Do you have any idea how to attribute the ID correctly?
Many thanks