Skip to content

Add optional JSON-array output for the Agent Flow Iteration node#6139

Open
Dexterity104 wants to merge 2 commits intoFlowiseAI:mainfrom
Dexterity104:feature/iteration-node-output-structure
Open

Add optional JSON-array output for the Agent Flow Iteration node#6139
Dexterity104 wants to merge 2 commits intoFlowiseAI:mainfrom
Dexterity104:feature/iteration-node-output-structure

Conversation

@Dexterity104
Copy link
Copy Markdown

Summary

Adds an Output Structure option on the Agent Flow Iteration node so results can stay in a fixed order and length that matches the input array, instead of only a single joined text string.

It's useful for flows that treat the iteration as a map over sections or rows and need a stable list to feed into another Iteration or any step that expects parseable JSON.

Closes #6091

Behavior

  • Aggregated Text (default): unchanged. output.content is all iteration outputs joined with newlines.
  • JSON Array: output.content is a JSON string of a string array (one entry per input index). If a sub-run has no text, that index is still present as an empty string so positions stay aligned with the input.

output.iterationResults remains the underlying string[] in both modes. content stays a string everywhere so the usual flow completion and variable paths keep working.

@Dexterity104 Dexterity104 force-pushed the feature/iteration-node-output-structure branch from 430944a to 270db43 Compare April 3, 2026 10:47
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Row Text Splitter node for line-based text processing and adds an Output Structure option to the Iteration node, allowing users to choose between aggregated text and JSON array formats. The server-side execution logic was updated to support these structures and ensure index alignment for JSON array outputs. I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Iteration node preserves array structure in output

1 participant