# Limit

The **Limit** component restricts how many items from a list pass forward to the next step in your flow. Use it when a connector returns more records than you need — for example, keeping only the first five collaborators from a Zendesk ticket or the ten most recent orders from Salesforce. Place it immediately after any step that outputs a list to control the volume of data your downstream steps process.

{% hint style="info" %}
This is especially useful when you only want to process a subset of records instead of the full list.
{% endhint %}

### **Use Case Example**

Suppose you are building a flow where you fetch a Zendesk ticket and want to notify only a limited number of collaborators about an update. Zendesk’s **Get Ticket** action returns a list of `collaborator_ids`, but you may only want to process the first 5 collaborators.

This is where **Limit** helps.\
You can narrow the list, e.g., to the first 5 collaborator IDs, before sending them to further steps such as **email**, **Slack**, or additional logic.

### **How does the Limit feature work?**

* After your connector step (for example, **Zendesk → Get Ticket**), add the **Limit** step from the **Transformation Actions** section.

<figure><img src="/files/CjuP0UVlL58f65xMgpXo" alt=""><figcaption></figcaption></figure>

* In the **List** field, provide the list you want to limit.\
  For example, if you're retrieving ticket details from Zendesk, you can use:\
  `{{steps.getTicket.output.ticket.collaborator_ids}}`

<figure><img src="/files/TlyIlLEd4DGDr0Nyz1FE" alt=""><figcaption></figcaption></figure>

* In **Max Items**, enter the maximum number of items you want to allow through.\
  **Example:** `5`

<figure><img src="/files/KQvBkxK9LU7T1ljEVy21" alt=""><figcaption></figcaption></figure>

* Choose the **starting direction** for the limit:

  * **From First Item**
  * **From Last Item**

  This defines whether the limit applies from the beginning or end of the list.

<figure><img src="/files/bn61E9zqLHla7aaU3PS4" alt=""><figcaption></figcaption></figure>

* Click **Save** in the top-right corner to apply the configuration.

<figure><img src="/files/e4STpDhR60UUylo45orI" alt=""><figcaption></figcaption></figure>

* To test the step, use the **Dashboard** button in the top-right corner.

<figure><img src="/files/SJK1RkxnsIPIz6jdMAHr" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fastn.ai/flow-setup-essentials/designing-a-flow/flow-transformation/limit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
