Skip to content
Agentic Workflowdocs
v0.9.0Install free

concepts / data

Item linking

Which item a reference to an earlier step returns, and how to keep related values together across steps and branches.

Three product links go through Get All Text from Link, then Summarization summarises each page. Get All Text from Link keeps url because Include input fields is on. Summarization outputs only summary, so the link is gone after it. Click each step to see where url disappears.

Example run: Split Out, 3 items → Get All Text from Link, ran 3 times, 3 items → Summarization, ran 3 times, 3 items. Illustration of a run. The ways to keep url are below.

Output of Summarization
#summary
0A light trail running shoe.
1A waterproof jacket.
2A bright head torch.
Illustration of a run. The ways to keep url are below.
You write… While the step works on item 2, you get…
{{ $input.url }} url of item 2, the item this run received.
{{ $('Get All Text from Link').url }} in a step directly connected to it url of the item from that step used in this run.
{{ $('Split Out').url }} in a step further down Empty: that step’s whole output is a list, and a list has no url field.
{{ $('Split Out').item.url }} url of the item of Split Out that item 2 came from.
{{ $('Split Out').1.url }} url of the second item of that list (counting starts at 0), whatever item is being processed.

$('Get contacts').item.email reads the item of Get contacts that the current item came from, even several steps back: AWFlow remembers which input item each output item was made from and follows that chain. Use it when a step further back produced the value you need for this item (for example the contact’s email, after a step that fetched its orders). When the chain isn’t known, it reads the item at the same position, else the first one. A step whose data really has a field called item keeps reading that field.

$json is another name for the current item, like $input: {{ $json.title }} and {{ $input.title }} read the same.

To read a whole list on purpose, write $('Split Out').all(), .first() or .last(). When you tap a value of an earlier step, the reference reads its matching item ($('X').item.url); tap the pill to switch to First item or All items, as a list (see Map data in the UI). When no item matches, an amber note says the item at the same position is used.

When a step receives two lists (from two steps linked into it):

  • in workflows with the new behaviour, items are paired by position: item 1 with item 1, item 2 with item 2. The step runs as many times as the longer list, with a warning when the counts differ. $('Step').field reads the paired item.
  • in Classic workflows (made before AWFlow 0.9), the step runs for every combination: 3 items and 4 items give 12 runs (a hint says so).

To get every combination on purpose, use Merge. See Workflow behaviour versions.

A step that receives no items is skipped in the new behaviour (it ran with nothing in Classic).

The third option works because a lambda workflow runs once per item: inside it, every earlier step holds a single item, so {{ $('Lambda Input').url }} reads the right value anywhere.

Add a stable field such as id or url before a workflow splits into branches. It gives Merge something reliable to match on later.

Every row shows the same title

The title comes from a step that isn’t directly connected, or from a step that output a single item, so every run reads the same value. Carry the title forward on each item and read it with $input.

A reference to an earlier step comes out empty

That step is not directly connected, so the reference reads its whole output. If the output is a list, use an index (.0.title) or carry the field forward instead. Also check the name: $('…') must match the node label exactly, including capitals and spaces.

After a Merge, fields are called left-title and right-title

Both inputs had a title field with different values, so Merge kept both and renamed them. Rename one side before the Merge, or use the prefixed names.

Ask Aria