All guides

Original explainer

n8n Split Out: turn an array of AI results into separate items

Split list elements into items while retaining a batch ID; verify counts and field placement to preserve ownership.

AI Nav CityWritten / Updated Sources checked

An AI request may return a list while later steps need one record at a time. The goal is to split two synthetic results into two items, each retaining its batch_id. The input field must be an array, and you need a workflow with Split Out. No n8n instance or real AI request was run.

Action and acceptance sequence

  1. Confirm the array

    Distinguish a list inside one item from multiple input items.[1]

  2. Choose retained fields

    Retain the batch fields each output item needs.[1]

  3. Verify counts

    Compare output counts and content with the input list.[1]

Check each stage separately; the final section states execution scope.

Locate the list field

The original sample has batch_id: demo-batch and a results array containing two objects with label and score. Expect two outputs, each with one result and the same batch_id. Inspect the actual input structure: Split Out separates a list in the chosen field. Multiple upstream items are a different shape from an array inside a single item.[1]

Configure splitting and batch retention

Set Field to Split Out to results. Include offers No Other Fields, All Other Fields and Selected Other Fields. For this exercise, choose Selected Other Fields and specify batch_id in Fields to Include. Set Destination Field Name to result if you need a stable destination. Decide what later steps need before retaining every field.[1]

Inspect count and ownership together

After running a disposable sample, confirm the output count equals the array length, every item retains batch_id, and each result occupies the expected field. Dot notation accesses child fields by default; review Disable Dot Notation for literal dotted keys. Include Binary separately controls binary input, so JSON retention does not establish whether a file is retained.[1]

Return to the data shape on failure

If the field is missing, is not an array, or ownership is lost, pause later actions and inspect the input and Include configuration. An offline synthetic array checked count and retention rules only. Split Out, uploads and model calls were not executed. Observe actual output and empty-array behavior in your own version; offline calculation is not a product execution result.[1]

Article sources

Original editorial content; official descriptions and checking suggestions are distinguished.

  1. n8n · Official sources
    View details