top of page

Welcome
to NumpyNinja Blogs

NumpyNinja: Blogs. Demystifying Tech,

One Blog at a Time.
Millions of views. 

Automate Your First API Workflow: A Hands-On Guide to Postman Flows

Updated: Feb 20

A Hands-On Guide to Postman Flows


APIs are everywhere today, and Postman has always been one of the most popular tools for working with them. But Postman recently introduced something even more exciting — Postman Flows, a visual way to automate and connect API calls without writing code. If you’ve ever wished API automation felt more like building with Lego blocks, this is for you.


What Exactly Are Postman Flows?

Postman Flows is a visual workflow builder inside Postman. Instead of writing scripts, you drag and drop blocks, connect them, and create logic that runs step by step. Think of it as a flowchart that actually executes your API calls.


It’s designed for:

  • Beginners who want to understand how APIs work

  • Testers who want to automate scenarios

  • Developers who want to quick prototypes

  • Teams who want to visualize API behavior


Why Use Postman Flows

Postman Flows is more than automation - it’s API orchestration :


  • Visual — you see the entire workflow at a glance

  • Simple — no scripting required

  • Reusable — build once, run anytime

  • Collaborative — easy to share with your team

  • Powerful — supports conditions, loops, delays, variables, and more


Core Building Blocks of Postman Flows


  • Send Request Block

This is the heart of any flow. It sends an API request and returns the response. You can chain multiple

requests together to build end‑to‑end scenarios.

  • Assign Block

Stores values (like tokens, IDs, or response fields) so you can use them later in the flow.

  • Condition Block

Lets you add logic. Example:

  • If the status code is 200 → continue

  • If not → send an alert or retry

  • Display Block

Display contents of the output body on the Display block. Help to verify the output data of API.

  • Connections

Arrows between blocks show the order of execution and how data moves from one block to another.


How Data Moves in a Flow

Every block can pass data to the next one. For example:

  1. Login API returns a token

  2. Assign block stores the token

  3. Next API uses that token in the header

This makes it easy to build multi‑step workflows without writing scripts.


A Simple Example: Login → Fetch User Data

Let’s say you want to automate a basic two‑step process:

Step 1: Call the login API

Step 2: Use the returned token to fetch user details


In Postman Flows, you would:

  • Add a Send Request block for login

  • Add an Assign block to extract and store the token

  • Add another Send Request block for the user details API

  • Connect them in order

You’ve just built a working automation flow without writing a single line of code.


Flow Setup Guide

Authenticate User and Retrieve Profile with DummyJSON API (https://dummyjson.com/docs/auth)

This guide will walk you through setting up, testing, and deploying an authentication flow in Postman that logs in a user, get access token and retrieves their profile information.


Prerequisites

  • Postman Account: You need an active Postman account.✓

  • Workspace Access: You have Admin access to the workspace ✓

  • Internet Connection: Required to access DummyJSON API and deploy the flow✓


Setting up Workspace for Postman flows

1. Create new workspace (test name) , New collection and setup dummy JSON API's as below.


Enter Workspace name

  1. Create new HTTP Post Request with below details and test if API is returning proper response as shown below diagram.


    Request:

    URL: https://dummyjson.com/auth/login

    Method: Post

    Content-type: json

    Body:

    { "username": "emilys", "password": "emilyspass", "expiresInMins": 30 }

You can get more sample users to test from https://dummyjson.com/users.


Response:

HTTP Status: 200

Response Body:

{

"id": 1,

"username": "emilys",

"email": "emily.johnson@x.dummyjson.com",

"firstName": "Emily",

"lastName": "Johnson",

"gender": "female",

"image": "https://dummyjson.com/icon/emilys/128",

"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",

"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

}

http POST request

3. Create another HTTP Request to get User profile details using above access token and test API.


Request:

Method: GET

Content-type: json

Header: Bearer accessToken value from above API.

Response:

 HTTP Status: 200

Response Body:

                {

"id": 1,

"username": "emilys",

"email": "emily.johnson@x.dummyjson.com",

"firstName": "Emily",

"lastName": "Johnson",

"gender": "female",

"image": "https://dummyjson.com/icon/emilys/128"

// other user fields

}


entering access Tokes

4. Save both requests to the collection.

5. Navigate to Flows and click Create New Flow. It will create new flow with Start activity.


click Create new flow

6. Click on the Add Block option and select "Create and Send HTTP Request" block. Select POST request

created in step 1. If you haven't created Step1 and Step 2 you can directly create new request via HTTP

request block.

Add Block

7. You can run and test the execution of API Flow. Flow diagram shows red dot on Success() indicating API

call was successful. You can verify HTTP Status and Response message in Output section under variables.

run API flow

8. Now lets pass username and password as parameters from start block, instead of hardcoded value. Click

edit icon next to Request URL and under body section change request body as below and click save.

{
    "username": "{{username}}",
    "password": "{{password}}",
    "expiresInMins": 30
  }
pass parameters

9. Lets add 2 new variables name "username" and "password" inside Start block by clicking Add input. Select

the username and password type as "select" as shown in right side diagram and then link username,

password from start block to username, password on Request block as shown in bottom diagram.

add variables

10. Go to Run option and edit Start Trigger and pass variables in popup window and click save.

Click Run and Verify flow is successful and access token is generated.


pass variables

click Run

🔗 API Chaining: Connecting the Logic

Once you have your Login working, the real power of Postman Flows is passing that data—like an Access

Token—automatically to your next request. Here is how to chain them:

  • Create the Profile Request

    • Right-click the Flow canvas and select HTTP Request.

    • Choose your GET /auth/me request (Step 3 from your setup).

    • The Key Step: In this request's Headers, set the Authorization key to Bearer {{token}}. By using the double curly braces, you're telling the Flow to wait for a dynamic value.


add another Request

edit request


  • Extract the Token

    • Find your first Login API block

    • Drag a connection from the Success port.

    • Select the Select block. In the "Enter Path" field, type:

      body.accessToken

      Note: This tells Postman exactly where to look in the JSON response to find your security key.



pass access Token
  • Close the Loop

    • Connect the output of that Select block directly to the token input on your GET /auth/me block.

    • You will now see a visual line connecting your login success to your profile request.

connect variable body.accessToken

  • Run & Visualize

    • Click Run.

    • Watch the blue "data pulse" move from the Login block, through the Select block, and into the Profile block.

    • If you see a red/green dot on the final block, you’ve successfully automated your first secure API chain!


    click Run
  • If you want to display output of API in separate block then you can connect display activity from Success() node of last API. Also you can change display format to json, Table, HTML etc.


observe execution of the flow
display output

What You Can Build with Postman Flows
  • Automated test scenarios

  • Multi‑step API workflows

  • Data processing pipelines

  • Scheduled tasks

  • Demo flows for presentations

  • Quick prototypes for new ideas

It’s flexible enough for simple tasks and powerful enough for complex logic


Conclusion

Postman Flows is a refreshing way to work with APIs. Whether you’re a tester, developer, or someone just learning APIs. Flows gives you a visual, intuitive way to automate and experiment. It removes the fear of scripting and replaces it with a clean, drag‑and‑drop experience.







 
 

+1 (302) 200-8320

NumPy_Ninja_Logo (1).png

Numpy Ninja Inc. 8 The Grn Ste A Dover, DE 19901

© Copyright 2025 by Numpy Ninja Inc.

  • Twitter
  • LinkedIn
bottom of page