How can I set a default environment for Postman Flows

Hi, I am trying to use Postman Flows with my existing environments.

I have requests in collections I am referencing, they run in different environments as defined in my environments.

It seems per request block you must set each environment manually, is there any way to set this for all using one consistent chosen environment, or the default which is selected in Postman?

See screenshot

Hi @jumanahalasadicm

Welcome to the forums!

Flows doesn’t have a way to set a universal Environment that all Send Request Blocks will use. However, if you set an environment on a Send Request Block then all subsequent Send Request Blocks in the flow that use a request from the same collection will default to that same environment. Likewise, if you update an environment on a Send Request Block, you will be prompted if you want to update all other Send Request Blocks that use a request in the same collection.

Let me know if there’s anything else I can clarify.

Hi @flows-daniel thank you for your answer. That is very unfortunate because I would have to make the same flow for all environments I have. Is there any way to set the block to the currently selected environment at the top? Like if there was a way to pass a variable in the environment input in the block.
{{ current_env }}

@jumanahalasadicm

Unfortunately there isn’t a way to set the Environment programmatically. The workarounds are either:

  1. As you mentioned duplicate the flow for different environments and run them each locally
  2. Edit the environments each run
  3. Depending on what your flows do, you could deploy them to the cloud and make a single flow that invokes each of the deployed flows (where each flow has a different environment selected)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.