# Limit

The **Limit** feature is available under **Flow Transformation**.

You can place it immediately after any connector step, such as **Zendesk**, **Salesforce**, **HubSpot**, or others, to control how many items from a returned list should move to the next step.

{% 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="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FVL3auM6ED4TIKlidmNjs%2Fimage.png?alt=media&#x26;token=a738ab7e-c66e-4815-b80d-4e155c0c9348" 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="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fn9DGFXfTOZnulLd0OlPq%2Fimage.png?alt=media&#x26;token=458073f5-e32f-4ad9-a065-103997f3cc9f" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FaDSBgNAybFY06u50ud6a%2Fimage.png?alt=media&#x26;token=a7f426c8-f30a-44a3-ae3b-8cd1270a37ea" 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="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FIvJwfBwVl66oc7fXNqTx%2Fimage.png?alt=media&#x26;token=300e9991-23c9-41e5-a9ba-1058344fdd6d" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2FNlT591HcVlKo1tjb8BQq%2Fimage.png?alt=media&#x26;token=7f825fc1-902a-4d10-8cad-60d9be7a7ba1" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2F6iy5RnvQNOGchu2dckr7%2Fimage.png?alt=media&#x26;token=2bf61ca4-e999-4080-8af9-0f888d896364" alt=""><figcaption></figcaption></figure>
