Understand Postman Flow with Advanced Examples

Postman Flows is an API workflow builder for logically connecting APIs. Use Flows in your Postman workspace to chain requests, handle data, and construct real-world workflows.

Postman Flow is a free beta feature available to all Postman members. To get started, go to the Postman web app or download the newest version of the Postman desktop client.

Before I proceed further in this post covering some of the advanced use cases implemented through Postman Flow, it is highly recommended to go through my previous video.

In my previous video, I have covered the basics of Postman flow as well as implemented a basic use case. You can watch the video below.

Down Arrow

Today I will be covering two advanced use cases implemented through Postman Flow. I will be using some free APIs and Postman blocks to implement the use cases. So without any further delay let’s start –

Use Case 1: Consolidating responses from multiple web services

I will be using the free Bored API which recommends activities based on categories.

Here are the steps –

    • Step 1 – Call Bored API to get activity recommendation of type recreational.
    • Step 2 – Call Bored API again to get another activity recommendation of type recreational.
    • Step 3 – Create a list containing recommendations from both call 1 and 2.
    • Step 4 – Finally print the list in the Terminal.

Watch the video below to understand how I have implemented this use case in Postman Flow. The blocks I have used from Postman are – Send Request, Create Data and Terminal

Use Case 2: Introducing the delay

I will be using the free Bored API which recommends activities based on categories and modify the previous implementation a little bit to introduce the delay

Here are the steps –

    • Step 1 – Call Bored API to get activity recommendation of type recreational.
    • Step 2 – Introduce the delay of 10 seconds
    • Step 3 – Call Bored API again to get another activity recommendation of type recreational after 10 seconds.
    • Step 4 – Create a list containing recommendations from both call 1 and 2.
    • Step 5 – Finally print the list in the Terminal.

Watch the video below to understand how I have implemented this use case in Postman Flow. The blocks I have used from Postman are – Send Request, Delay, Create Data and Terminal.

Use Case 3: Loop through the result

I will be using the free Cocktail Database API which recommends cocktail drinks based on ingredients.

Here are the steps –

    • Step 1 – Call Cocktail API to get cocktail drinks based on the ingredient Vodka.
    • Step 2 – Loop through the result
    • Step 3 – Create variable to store the cocktail drink name
    • Step 4 – Finally print the name in the Terminal.

Watch the video below to understand how I have implemented this use case in Postman Flow. The blocks I have used from Postman are – Send Request, For Each, Create Data and Terminal.

Use Case 4: Validate the result

I will be using the free Open-Meteo API which returns the weather information based on the location.

Here are the steps –

    • Step 1 – Call Open-Meteo API to get Vancouver weather information.
    • Step 2 – Call Open-Meteo API to get New York weather information.
    • Step 3 – Validate whether Vancouver’s Windspeed is less than equal to New York’s Windspeed
    • Step 4 – If yes, print Vancouver’s weather information.

Watch the video below to understand how I have implemented this use case in Postman Flow. The blocks I have used from Postman are – Send Request, Check and Terminal.

Conclusion

I think this new feature is beneficial for implementing multiple use cases in more drag and drop approach. Flows is in beta, and the Postman team is continuously working on it. I would love to hear about your flow creations, and any bugs you’ve run into while working with Postman flow.

3 Comments

  1. Chaitanya Bharat

    if then else block

    Reply
    • Chaitanya Bharat

      not properly explained in the documentation. Present in version 9.31.0

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *