Skip to Content
BuildAction StepsSort

Sort

The Sort step puts a list in order. You name the field to sort by and the direction, and it returns the same items rearranged.

At a glanceVerified in app · Oct 29, 2026
Use it to
Order a list by up to 10 fields with automatic or explicit type detection (Number, Text, Date)
Find it
Tools → Data → Lists → Sort
Cost
1 Step credit per execution
Limits
Up to 100,000 items · Up to 10 Sort by tie-breaker rows
Output
{{ N.results }} (the reordered list), {{ N.resultCount }}
Instead
Inline pipe ({{ 1.items | sort }}) for simple list sorting

Use it when order carries meaning: the highest-value orders first, the oldest tickets first, names in alphabetical order for a report someone will read.

Sorting inside a field? You can sort or reverse lists directly inside field tokens using Data Transformation:

  • Sort alphabetically or by field: {{ 2.records | sort:ascending:name }}
  • Reverse ordering: {{ 2.records | reverse }}

Use the Sort canvas step when you need multi-level tie-breaking rules (e.g. priority then date) or when dealing with large datasets (up to 100,000 items).

Setting it up

Choose the list

Pick it from the lists the field offers, which come from the steps before this one. Choose Enter it myself to type a reference such as {{ 3.results }} or paste a JSON list instead.

Add a Sort by row

Name the field inside each item, such as total or created_at. Every item in the list must contain the field used for sorting. Leave the field blank to compare each whole item, which suits a list of plain values.

Choose the direction

Ascending puts the smallest first, descending the largest. Type starts as Automatic: Sort reads the values and works out whether they are text, numbers or dates. Pick Text, Number or Date yourself only when you want to override that.

Add more rows if one is not enough

Click Add another criterion to add up to ten rows, applied in the order they are listed. The second row only decides ties in the first.

Breaking ties with a second rule

One rule sorts by one thing, and leaves entries that share that value in whatever order they arrived.

Add a second row to break ties. For tickets with a numeric priority_rank where 1 is most urgent, sort by that rank and then by date. Alphabetical priority labels do not necessarily follow urgency order:

RowFieldTypeDirection
1priority_rankNumberAscending
2created_atDateAscending

Rows are applied in order, so the first one is the one that matters most.

Automatic works the type out for you

Type starts as Automatic: Sort inspects every value in the column and picks the shared type (Number, Text, or Date). Override Type explicitly when numeric product codes should sort as text, or when values need a fixed comparison rule:

TypeHow values are ordered
NumberCompares numeric values (20 comes before 100).
TextCompares character by character ("100" comes before "20"). Capitals sort before lowercase ("Zebra" before "apple") unless Ignore capitalisation is enabled.
DateCompares chronological instants from earliest to latest (or latest to earliest).

If values in the column mix incompatible types, or do not match the explicit type you chose, Sort stops the run and names the conflicting entry rather than guessing.

What it passes on

The same items in the new order:

{{ 5.results }}

Nothing is added or removed. A list of ten comes back as a list of ten.

{{ 5.resultCount }} returns the number of items in {{ 5.results }}.

Examples to copy

Highest value first

Orders from a shop, largest first, so a report can lead with them.

  • Field: total
  • Type: Number
  • Direction: Descending

Follow it with a Limit to keep only the top few.

Oldest ticket first

A support queue, so the longest-waiting request is dealt with first.

  • Field: created_at
  • Type: Date
  • Direction: Ascending

Automatic picks both of these types up on its own. Set the type explicitly when you want to pin it.

Limits

Sort works on lists of up to 100,000 items and takes at most ten Sort by rows. Beyond either, it refuses and says so rather than returning a partial answer. Request a smaller dataset or reduce the number of rules. Sorting separate batches does not produce a globally sorted list; use source-side sorting or a separate merge process when global order matters.

Verify it works
Run
Point Sort at a sample list, set a Sort by field and direction, and click Run step in Test & Debug
You should see
The Output tab returns results in the new order and resultCount matching the input length.

What’s Next?

  • 👉 Limit →: take the first few items after sorting them.
  • Filter: remove entries before sorting the list.
  • Summarize: count or total a list instead of reordering it.
Last updated on

Search documentation

Start with a guide, or search by Step, task or error.