Looping through json array to create one text

Hi there,
I am currently unsure about how to handle a json array with multiple entries.

Any hint is highly appreciated!

Describe the problem/error/question

I query an API that can, not must, return an array with multiple items, for example IP and Name.

What I want to achieve now is to itterate through all items and create one final message that I can put into an email.

Like:
We found those IP addresses:
IP (from first array item)
IP (from second array item)
etc.

I do know there is the loop, but I dont want to send multiple mails, I want to concatonate it into this one text.

What is the error message (if any)?

No error

Please share your workflow

Doesnt exist yet - still trying

Information on your n8n setup

  • n8n version: 1.81.4
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): self-hosted via npm
  • Operating system: Ubuntu

You can use the Aggregate node. See example

ah cool, thank you @Franz - that seems exactly what I missed :sweat_smile:

1 Like

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