TIP (GOTCHA): Postman (v11.27.4): The value of a {{var}} set to an Environment variable (specifically) under Request settings is exposed as a Port on a Flow Request but does not VISUALLY APPEAR to take the Environment variable value (but in fact does)

Icon class
icon_class
far fa-sticky-note
icon_class_computed
far fa-sticky-note
Note kind
Policy level
Keywords

If you look at the Postman forums you'll find this feature has tripped up quite a few new users, although it makes perfect sense once you know how it works.

Note that this is specifically about an assignment of a parameter to an Environment variable, say {{env}} (which will show in blue under Request settings in most themes) not a regular {{var}} (which will show in red in most themes).

Under the main settings for a Request under Params for GET Query Params or under Body for POST (which offers different POST modes) you can choose to have the value of a parameter be set to an environment variable (if it doesn't prompt you immediately start typing '{{'). This then works fine for a direct Request Send, it takes the current value from the assigned Environment.

As always, remember to Save your Request settings, otherwise the changes won't appear on your Flow's Request block usage of that Request.

It will then expose that parameter (in this example {{env}}) as a Port on a Request block for that Request in a Flow but does not VISUALLY APPEAR to take the environment variable value and will look "empty", which may come as a surprise if you are new to Postman.

Now make sure you have that same Environment set on your Request block. If you run your Flow WITHOUT additionally connecting the corresponding "empty" Port, it will indeed take the value from the environment.

If you wish to override the "empty" environment value the DO additionally connect the corresponding "empty" Port to drive it (using a String, Number or other as appropriate), it will the instead take the value provided from your Flow.

If you wish to return to using the Environment variable disconnect your driving Flow value then be sure to perform a Clear in the value field for the variable (otherwise it will stay on Select as indicated by a little link icon)

Unfortunately, there doesn't seem to be a way to hide specific variables on a Request block, so you can end up with quite large Requests with lots of "empty" unconnected variable rows that are in fact driven by the Environment variables.

Relates to
Related notes
Related notes (backlinks)
Related snippets (extracts)
Visit also
Visit also (backlinks)
External links