How to aggregate after a loop

Describe the problem/error/question

Hello,

I’m working on a workflow in n8n and I’m facing an issue I can’t quite solve.

I have a form that returns a variable containing an array of 3 IDs (e.g. [id1, id2, id3]).

For each ID, I perform a search in Airtable to retrieve the name associated with that ID.

My goal is the following:
:right_arrow: Once I’ve retrieved the 3 names, I want to concatenate them into a single variable, either as an array or a string, and output a single item containing all 3 names together.

Right now, each Airtable search returns a separate item.
I’m looking for a way to gather all results into one single item that contains all the names.

Do you have a recommended approach or best practice to achieve this in n8n?

Thanks in advance for your help!

Information on your n8n setup

  • **n8n version: ** 1.95.2
  • Database (default: SQLite): sqllite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8ncloud
  • Operating system:

Aggregate should work

This option might meet your requirement.

Hey, Arthur! As an option - you can aggregate names with a Code node

yep i tried but my workflow didn’t go through de “done” output (dont know why)

Looks like the problem is not from Aggregate since it didn’t being triggered at all.

Can you confirm 3 searchs all have a result?

Or can you check out the option always output data in the Airtable node

1 Like

oh yeah i missed it, now it works and the aggregate works too, thank a lot !

1 Like

No problem!

remember to mark as solution will be very helpful!

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