跳转到内容
Agentic Workflowdocs
v0.8.2免费安装

节点 / builtin / datatransformation

Split Out

Turn one item with an array field into many items

数据 扩展程序网页应用

此内容尚不支持你的语言。

Turn a list inside one item into separate items, so the next nodes handle each entry on its own.

工作流 · save-links-to-sheet.awf 4 个步骤

Save All Page Links to Sheet:包含 4 个步骤的工作流,从 When Started 开始,到 Add a row per link 结束。

Split Out reads the list in Field To Split Out and sends one item per entry. Each new item holds the entry under one field: Output field name if you set it, otherwise the last part of the path. Splitting tags with Output field name tag turns { "tags": ["a", "b"] } into { "tag": "a" } and { "tag": "b" }.

Entries are always wrapped this way, even when they are objects, so a result object ends up under { "result": { ... } }.

With Include Other Fields on, the item’s other top-level fields are copied onto every new item. That is how each entry keeps track of where it came from, for example an order id next to each order line.

If the field holds a single value instead of a list, you get one item. An empty list gives no items.

  • An API returns one item with a results list, and you want the next nodes to run once per result.
  • Turn a tags or emails list into items you can Filter, Sort or send one by one.
  • Expand order lines while keeping the order’s id and date on each line.
  • If you want the entries passed on as they are (not wrapped in a field), use Pick Field instead.
设置项类型作用
Field To Split Out (必填)TextThe path to the array field to split out (without the node name or id).
Output field name TextThe name of the field each element is placed under. Defaults to the field being split out.
Include Other Fields ToggleWhether to carry the remaining input fields onto each output item. 默认值:Off

Write Field To Split Out as field names joined by dots, starting from the incoming data: results or data.results, not $input.results.

Include Other Fields removes the whole top-level field the path starts in. Splitting data.results drops everything under data, not just results.

  • Output

One item per list entry. Read an entry downstream with {{ $input.tag }} (using your output field name), or {{ $input.result.title }} when the entries are objects.

None. This node needs no connection and has no slots for other nodes.

  1. An Http Request node returns { "orderId": 42, "lines": [ { "sku": "A1", "qty": 2 }, { "sku": "B7", "qty": 1 } ] }.
  2. Split Out with Field To Split Out lines, Output field name line and Include Other Fields on. You get two items, each with orderId and line.
  3. A Google Sheets node (Data, Append Values into Worksheet) adds the lines to your sheet, reading {{ $input.orderId }}, {{ $input.line.sku }} and {{ $input.line.qty }}.
  • “Field “…” does not exist in the input object”. The path does not match the incoming data. The message shows the data the node received: check the spelling and upper and lower case.
  • Only one item comes out. The field holds a single value, not a list. Point the path at the list itself.
  • No items come out. The list is empty, so there is nothing to split.
  • “No source node is connected to this node.” Connect the node that produces the data to Split Out’s input.
  • Pick Field: keep one field, passing objects through as they are.
  • Aggregate: the reverse, gather many items back into one list.
  • Limit: keep only the first few entries.
  • Split in Batches: work through the items a batch at a time.
编辑此页

最近更新:

Was this page useful?
向 Aria 询问“Split Out”