For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Postman
PricingEnterprise
Contact SalesSign InSign Up for Free
HomeDocs
HomeDocs
      • Overview
        • Overview
          • Blocks reference
            • Looping blocks overview
            • Repeat
            • For
            • Collect
        • Deployed flows overview
        • Connector blocks overview
Postman API Platform

Product

  • Postman Overview
  • Enterprise
  • Spec Hub
  • Flows
  • Agent Mode
  • API Catalog
  • Fern
  • Postman CLI
  • Integrations
  • Workspaces
  • Plans and pricing

API Network

  • App Security
  • Artificial Intelligence
  • Communication
  • Data Analytics
  • Database
  • Developer Productivity
  • DevOps
  • Ecommerce
  • eSignature
  • Financial Services
  • Payments
  • Travel

Resources

  • Postman Docs
  • Academy
  • Community
  • Templates
  • Intergalactic
  • Videos
  • MCP Servers

Legal and Security

  • Legal Terms Hub
  • Terms of Service
  • Postman Product Terms
  • Security
  • Website Terms of Use

Company

  • About
  • Careers and culture
  • Contact us
  • Partner program
  • Customer stories
  • Student programs
  • Press and media
Twitter iconLinkedIn iconGithub iconYouTube iconInstagram iconDiscord icon
Download Postman
Privacy Policy

© 2026 Postman, Inc.

On this page
  • Inputs
  • Output
  • Setup
  • Example
  • Related blocks
  • Related pages
Postman FlowsFlows referenceBlocksLooping

The For block

||View as Markdown|
Was this page helpful?
Previous

The Repeat block

Next

The Collect block

Built with

The For block always serves as the beginning of a loop. See 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. 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 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.

Related blocks

To supply the array that the For block requires as input, use any of the blocks described in the Setup section.

Besides the For block, the other option for beginning a loop is the Repeat block. See 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
  • Create a count-based loop with the Repeat block
  • Create a dashboard using Postman Flows
  • Create a list-based loop with the For block
  • Send information from one system to another using Postman Flows