FAQ
Flows
Looping in workflows

Looping in workflows

Looping is a powerful feature that allows you to repeatedly run a specific action or set of actions for each item in a list. This ensures that each item is handled individually and consistently, which is especially useful when dealing with multiple data points or records.

Example:

Imagine you have a list of customer orders. Each order needs to go through the following steps:

  1. Send a confirmation email.

  2. Update the order status.

  3. Notify the customer.

Looping ensures that each order is processed individually and in the correct sequence.

How to add loop in workflow

To implement looping in a workflow, you can utilize Webhook Advanced Configuration. This allows you to iterate over a list of items and run actions for each item individually.

Screenshot 2025-06-17 at 4.33.01 PM.png

Examples of Looping in Workflow Automation

1. Sending Notifications to Multiple Users

  • Data: A list of users who need to be notified (e.g., new leads, updates, etc.).

  • Loop: The workflow loops through each user.

  • Action: For each user, it sends a personalized notification via email, SMS, or push notification.

2. Updating Records in a Database

  • Data: A list of database records that need to be updated.

  • Loop: The workflow iterates over each record.

  • Action: It performs actions like updating a field, adding a note, or tagging the record based on certain conditions.

Advanced Webhook Configuration is useful when your payload consists of a list, and you need to process each item individually.

This allows you to iterate over a list of items and run actions for each item individually.

How it works?

To send a list of items to the webhook, you can structure the payload as an array (list) of objects. Here's how you can do it :

[
  {
    "name": "Salesforce"
  },
  {
    "name": "HubSpot"
  },
  {
    "name": "Slack"
  },
  {
    "name": "Dropbox"
  },
  {
    "name": "Zoom"
  },
  {
    "name": "Trello"
  }
]

And for each iteration, you can check which data is being iterated.

image (4).png

Here’s how each feature works in detail:

1. Run Flow One by One

  • How it Works:
    When this option is enabled, the webhook ensures that each item in a list is processed sequentially. Rather than processing all items at once, the flow runs for each item, one at a time.

  • For instance, if the payload contains 100 items and the "Run Flow One by One" option is enabled, the webhook will process one item and wait for the completion before moving on to the next item.

2. Setup Delay

  • How it Works:
    A delay can be added to the webhook execution by appending a delay parameter in the URL of the webhook request. This delay is specified in minutes and will pause the execution of the flow for the designated amount of time before the action is triggered.

  • For example, appending ?delay=5 to the webhook URL would delay the flow for 5 minutes. This can be useful when you want to space out the execution of actions, perhaps to avoid overwhelming systems or to give time for other processes to complete before moving forward.

  • Example URL with delay:
    https://flow.sokt.io/func/scri9C0I5jWA?delay=2

    This would delay the flow for 2 minutes before starting the execution.

3. Flow Control Condition

  • How it Works:
    This option allows you to set conditions that must be met before the webhook flow is triggered. You can define specific rules or checks that need to be satisfied within the incoming payload. Only if these conditions are met will the flow proceed; otherwise, the flow will be skipped.

  • For example, you might want to execute a flow only if a certain field in the payload has a specific value, or if a user’s status is "active". If the condition is not met, the flow will not be executed, preventing unnecessary actions from taking place.

Use Case :

You can use Advanced Webhook Configuration when you need to iterate through a list of items in the workflow, essentially enabling

looping within the workflow.

Advanced Webhook Configuration
Jul 29, 2025