*** title: The For block updated: 2025-07-14T00:00:00.000Z topictype: reference slug: docs/postman-flows/reference/blocks/for max-toc-depth: 2 ---------------- The **For** block always serves as the beginning of a loop. See [Loops with the For block](/docs/postman-flows/build-flows/structure/loops/overview/#loops-with-the-for-block). Technically, the **For** block is a control block used to repeatedly run a series of blocks in your flow. It accepts an array as input, and sends each item in the array from its output port, one item at a time. At the end of the loop, after whatever blocks you use to process data within the loop, you must have a [**Collect** block](/docs/postman-flows/reference/blocks/collect/). The **Collect** block gathers the individual items sent from the **For** block, and places them back into their original array order. ## Inputs **List** - Accepts an array of values like `[1,2,3]` or `["one","two","three"]`. The **For** block requires an array to be sent this input in order to run. **Start** - Connecting another block to this input port is optional. If no block is connected here, the arrival of data at the **List** input port triggers the **For** block. If you do connect another block to the **Start** input, the **For** block runs only when it has received data from both connected blocks. This provides control over the order in which blocks run in your flow. For example, if you connect an **HTTP Request** block to the **Start** input, the **For** block will run only when data has arrived at *both* the **List** and **Start** inputs. ## Output **Item** - Sends each item in the list sequentially, one at a time. ## Setup To set up the **For** block, connect the **List** input port to another block's output port that sends an array. Blocks that can send an array include the following: * A **List** block * A **Get Variable** block with a variable that has an array * An **Evaluate** block with an [inserted](/docs/postman-flows/reference/blocks/overview/#insert-data-blocks-into-other-blocks) **List** block * A **Select** block that selects an array Optionally, you can connect the **Start** input port to another block's output port to trigger the **For** block. ## Example To see the **For** block in an example flow, check out [Flow Snippets: For](https://www.postman.com/postman/flows-snippets/flow/63b89820a365885b55bc51f6). ## Related blocks To supply the array that the **For** block requires as input, use any of the blocks described in the [Setup](#setup) section. Besides the **For** block, the other option for beginning a loop is the **Repeat** block. See [Loops with the Repeat block](/docs/postman-flows/build-flows/structure/loops/overview/#loops-with-the-repeat-block). ## Related pages For more information about creating loops in Flows and tutorials that use the **For** block, see the following: * [Loops overview](/docs/postman-flows/build-flows/structure/loops/overview/) * [Create a count-based loop with the Repeat block](/docs/postman-flows/tutorials/beginner/create-count-based-loop/) * [Create a dashboard using Postman Flows](/docs/postman-flows/tutorials/advanced/create-a-dashboard-in-flows/) * [Create a list-based loop with the For block](/docs/postman-flows/tutorials/beginner/create-list-based-loop/) * [Send information from one system to another using Postman Flows](/docs/postman-flows/tutorials/advanced/send-information-from-one-system-to-another/)