The Sort Data block allows you to organize and arrange data in your workflow, whether it’s table data or variables containing arrays. This is useful for:

  • Rearranging table data based on specific properties
  • Sorting arrays or lists stored in variables
  • Organizing scraped or collected data before exporting

This block is often used in data manipulation, automation workflows, and AI-powered sorting tasks.

Inputs

☐ Description (Optional)

A brief note explaining the purpose of this sorting operation.

☐ Data Source (Required)

Choose what type of data to sort:

Sort Options

Description: Select the data source and sorting method.

Sources:

    ☐ Edit Table Columns (sort table data)

    ☐ Variable (sort array/list data)

Features:

    ☐ Sort by property

    ☐ Multiple sort criteria

    ☐ Ascending/Descending order

☐ Sort Properties (Required if sorting by property)

Define how the data should be sorted.

Good Examples:

  • “price” (for product data)
  • “lastName” (for user data)
  • “date” (for timestamps)

☐ Output Options (Required)

Choose where to store the sorted data:

Output Settings

Options:

    ☐ Assign to Variable (store in new variable)

    ☐ Insert to Table (update existing table)

Note: You can select both options to store results in multiple locations

Use Cases

  • Sorting Data Alphabetically → Useful for names, products, or lists
  • Arranging Numbers in Order → Sort numerical values from smallest to largest
  • Reordering JSON or Objects → Organize data based on specific attributes
  • Filtering & Processing Data Before Exporting → Ensure data is well-structured before saving

Usage Examples

1. Price Sorting

Sourceproducts
Propertyprice
Orderascending
OutputsortedProducts
Sort products by price (lowest to highest)

2. Name Sorting

SourceuserList
PropertylastName
Orderascending
TableUsers
Sort users alphabetically by last name

3. Date Sorting

Sourceevents
Propertydate
Orderdescending
OutputsortedEvents
Sort events by date (newest first)

Notes

  • Ensure data types match before sorting
  • Check for missing or null values
  • Consider performance with large datasets
  • Verify sort order meets requirements