Skip to main content

Limit

Limit the number of data items.

Overview

The Limit node allows you to control the number of items that pass through your workflow by setting a maximum limit and specifying which items to keep.

Parameters

Max Items

  • Type: Number
  • Description: Specifies the maximum number of items that will pass through this node. You can set this as either a fixed number or use an expression.

Keep

  • Options:
    • First Items
    • Last Items
  • Description: Determines which items to keep when limiting the total number of items. Currently supports keeping the first or last N items in the sequence.

Usage

  1. Add a Limit node to your workflow where you need to restrict the number of items.
  2. Set the "Max Items" parameter to your desired limit.
  3. Choose "Keep Option" in the Keep dropdown to retain the initial items up to your specified limit.

Example

If you have a workflow that returns 100 items but you only want to process the first 5:

  1. Add a Limit node after your data source
  2. Set Max Items to 5
  3. Keep "First Items" selected
  4. The workflow will now only process the first 5 items, discarding the rest

Notes

  • The Limit node is useful for:
    • Testing workflows with a smaller dataset
    • Restricting output to a specific number of items
    • Controlling workflow processing load
    • Implementing pagination-like functionality