nodes / builtin / datatransformation
Limit
Cap the number of items that flow through the workflow
Cap the number of items that flow through the workflow.
What it does
Section titled “What it does”Limit takes the whole list of incoming items at once and keeps at most Max Items of them: either the first ones or the last ones. Everything beyond the limit is dropped.
If the list already has fewer items than the limit, it passes through unchanged. A single object counts as a list of one.
When to use it
Section titled “When to use it”- Try a workflow on a small sample of a large list before running it on everything.
- Keep only the most recent (or earliest) records, for example the last 5 rows after a Sort.
- Protect an AI model or an outside service from being called for hundreds of items at once.
- To drop items by a condition rather than by count, use Filter instead.
Inputs and settings
Section titled “Inputs and settings”| Setting | Type | What it does |
|---|---|---|
| Max Items | Number | The maximum number of items to keep. Default: 10 |
| Keep | Choice | Whether to keep the first or the last items. Options: First items, Last items. Default: First items |
Max Items must be a whole number of at least 1.
Outputs
Section titled “Outputs”-
Output
The kept items, unchanged and in their original order. The next node runs once per kept item.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Example workflow
Section titled “Example workflow”- Get All Link collects every link on the current page.
- Limit with Max Items
5and Keep First items. - Get All Text from Link reads only those five pages.
Common issues
Section titled “Common issues”- “No source node is connected to this node.” Limit has no input. Connect the node that produces the list.
- Limit seems to have no effect. The node before it sends one object that contains a list, not a list of items. Use Split Out first to turn that list into items.
Related nodes
Section titled “Related nodes”- Filter: keep items that match a condition.
- Sort: order items before keeping the first or last.
- Split Out: turn a list inside one item into separate items.
- Remove Duplicates: drop repeated items.