How to get the correct individual item-data before the loop

Hi,

When I start the following workflow Airtable1 finds 3 items.
But when I want Airtable2 to update a field in each item, only the first item out of Airtable1 gets “updated (3 times)” …

So, what do I have to change in Airtable2 (or even Set?) that Airtable2 can do its update in the correct item-id?

Best regards
Martin

Information on your n8n setup

  • n8n version: 0.215.1
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

You can try the new magic item linking (which I think will become the default in time). It’s aware of the parent object/s it came from.

Can you try $("Airtable").item.id?

See: Built in methods and variables reference - n8n Documentation

And for the concept: Item linking concepts - n8n Documentation

Edit: the other solution, if for some reason the item linking doesn’t work, is to reference the id from the SplitInBatches node instead of Airtable, it should return the correct id for each run using your existing reference method.

2 Likes

Split in Batches worked. :muscle:
Thank you very much. :pray:

1 Like

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