Hi everyone,
I’m building a workflow in n8n where:
- I receive an array of keywords.
- I use a Split Out node to turn them into individual items.
- Example of Split Out output:
[
{ "keywords": "aspirin" },
{ "keywords": "pain" },
{ "keywords": "fever" }
]
- I pass those items into a Loop Over Items node.
- Inside the loop, I want to run a SQL query (Supabase) for each keyword.
- For example, using the filter:
description=ilike.%{{$json.keywords}}%
- Finally, I want to merge all results from each iteration into a single object/array so I can process them later, something like this:
{
"results": [
{ "id": 1, "description": "Contains aspirin" },
{ "id": 2, "description": "Treatment for pain" },
{ "id": 3, "description": "Reduces fever" }
]
}
Current issue
- Split Out works correctly and generates separate items.
- Loop Over Items receives each keyword one by one.
- The SQL node runs, but at the end I don’t know how to combine all results from the loop into one object.
Screenshots
(Here I would attach the screenshots: Split Out with keywords, Loop configuration, SQL node with filters, etc.)
Question
What’s the best way in n8n to merge the SQL results from each iteration into a single object/array after the loop finishes?
Should I use a Function Node at the end, a Merge Node (Append), or is there a more straightforward way to do this in n8n?




