Processing airtable search node results

Hello,

I had multiple issues recently so I did a clean install and it solved all of my issues except one.
I am still having issues processing Airtable results.

It seems to be due to the new Airtable node.
For some reason, if a field is filled in some rows and not others, workflows that used to work will now fail.

Please see this simple workflow:

Here is the output of the payload node:


[
{
"id_airtable": 
"recb9fLwURL3DWe3o",
"siren": 
"542020862",
"airtable_comptes_table_id": 
"tbl7KBoqTAcy8fDj6",
"airtable_base_id": 
"appwsIKVTg00UVq1l",
"airtable_contacts_table_id": 
"tblJQfOqt0GT6rsXy",
"denomination": 
"LAPEYRE"
}
]

Here is the output of my Airtable search node:

[
  {
    "id": "rec6i0R0bKhQamVGN",
    "createdTime": "2023-10-25T07:25:25.000Z",
    "nom_prenom": "JEAN-GABRIEL",
    "nom_famille": "GORSE",
    "compte": [
      "rec00X2Mleu2nZh01"
    ],
    "poste_id_siren": [
      "recyaBoZDjf1LpruR"
    ],
    "id_deduplicate": "1948-12GORSE329022685",
    "civilite": "Monsieur",
    "nom_complet": "JEAN-GABRIEL GORSE",
    "id_airtable": "rec6i0R0bKhQamVGN",
    "compte_denomination": [
      "PESAGE LORRAIN CONTINU ET DISCONTINU"
    ],
    "poste_nom": [
      "directeur général"
    ],
    "compte_id_airtable": [
      "rec00X2Mleu2nZh01"
    ]
  },
  {
    "id": "recBEmwiCLTPtS52s",
    "createdTime": "2023-10-25T07:25:24.000Z",
    "nom_prenom": "ADRIEN",
    "nom_famille": "GORSE",
    "compte": [
      "rec00X2Mleu2nZh01"
    ],
    "id_deduplicate": "1987-01GORSE329022685",
    "civilite": "Monsieur",
    "nom_complet": "ADRIEN GORSE",
    "id_airtable": "recBEmwiCLTPtS52s",
    "compte_denomination": [
      "PESAGE LORRAIN CONTINU ET DISCONTINU"
    ],
    "compte_id_airtable": [
      "rec00X2Mleu2nZh01"
    ]
  }
]

Here is the error:

NodeOperationError: No data found for item-index: "1"
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Set/v2/manual.mode.js:171:15)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Set/v2/SetV2.node.js:233:57)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:670:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:652:53

Is there a workaround to ignore undefined fields?

Thank you for your help!
Joachim

Hey @Joachim_Brindeau
thank you for the detailed error description. Good thing is, that I am able to reproduce the error. Bad thing is that I don’t know why it is happening.

A hacky solution is to set the fields with the Code Node. You’ll find it in the attached workflow.

But I think someone from the team should take a deeper look into this. I made a reproducable workflow wich is also in the attached workflow.

Hope the hacky solution helps at least for now.

Cheers

2 Likes

Thank you!
My workflow is temporarily working with a one by one loop, let’s hope this gets solved.
I believe I have the same issue with Notion but didn’t have time to properly check.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.