How to Select the Next Value from an Array?

Hi,

As you can see in the screenshot I’m getting a query with 7 values.
When i use the syntax {{ $fromAI(“slackuserid”, “next slackuserid”) }} it will send 7 times the same value instead of iterating through the 7 values.

I tried fetching the query e…g {{ $json[“query”] [“username”] }} but this is giving an undefined error. What is the best and simplest way to just iterate through the values that actually are being sent.

I also considered loop tools but they are not allowed to connect on the Tool node of the agent.

instance information

Debug info

core

  • n8nVersion: 1.76.1
  • platform: docker (cloud)
  • nodeJsVersion: 20.18.1
  • database: sqlite
  • executionMode: regular
  • concurrency: 5
  • license: community
  • consumerId: 00000000-0000-0000-0000-000000000000

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 168 hours
  • maxCount: 2500 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/132.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-02-08T14:48:01.549Z

1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hey @Rick_Hoebee

Have you tried using Split Out node inside the tool workflow?

I have this exact same issue and the split on the subworkflow doesn’t work because all the executions are coming with the same id, does anyone have a solution to this?

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