Configure values for flows

View as Markdown

When working with flows, you’ll often want to include static values for the blocks to use. This includes parameters used in HTTP requests and variables used in other kinds of blocks. You can also choose to reference environment variables and vault secrets in flows.

In Postman these values are called configurations. This topic explains how to use configurations and what to expect when others use your flow in the cloud.

The Configurations panel in a flow’s Settings is where you’ll specify these values. You can set the type of a configuration to Secret, String, Bool, or Number. When you set the type of a configuration to Secret, Postman encrypts it and stores it securely.

When you reference an environment variable or a vault secret in a configuration, the values are retrieved when the flow is run locally or deployed in the cloud. If you change the value of an environment variable or vault secret after a flow has been deployed, it uses the value saved when it was deployed. When you specify a new variable in your configuration, you can select an environment in which to save it or create a new environment and save it there. Similarly, you can define a new vault secret and save it to your Postman Local Vault.

Users who clone a flow you’ve deployed won’t see the values you’ve set, but they will see the names of all the configurations you’ve created. They can then enter the values needed to run it on their own systems.

To use a configuration that you’ve set, add a Get Configuration block on the canvas or inline within another type of block.

This topic assumes that you have begun to create a flow.

Identify values your flow will need

Here are some examples of the kinds of values your flows might need:

  • API keys that HTTP Request blocks use to communicate with APIs
  • Channel IDs for Discord, Slack, or similar platforms
  • Version numbers for APIs that your flow calls
  • Secret keys that Evaluate blocks use to compute HMAC signatures for HTTP headers

Often, a particular value will be used in multiple places within a flow. When you change a value in the Configurations panel, Postman applies that single change throughout the flow. This helps when, for example, you need to change the target Slack channel your flow sends messages to, or to update the version of an API your flow calls.

Before creating configurations for your flow, it’s a best practice to figure out what values your flow will need and decide how you want Postman to treat each value. The options are Secret, String, Bool, and Number.

Create or view configurations for your flow

To create configurations, complete the following steps. To view configurations, stop once you get to Configurations.

  1. In the right sidebar, click Setting icon Flow Settings.
  2. Under Configurations, create and set the desired values.
  3. By default, Postman designates values entered here as Locked icon Secret, and encrypts the values. For values that you don’t want to treat as secrets, use the dropdown to set their type to String icon String.

Create a Get Configuration block

You can either add a Get Configuration block on the canvas, or insert one inline in the blocks listed in the Get Configuration reference.

Override configuration values when deploying flows

When deploying a flow, you can temporarily override the value of a configuration. If you used an environment variable or vault secret in a configuration, it’s selected by default. You can change the value of the variable when you deploy the flow, use another variable, or use a static value based on your requirements. This helps when, for example, you create and test a flow in a development environment, but deploying the flow into production requires overriding one or more configurations.

To deploy a flow while overriding configurations, do the following:

  1. Click Deploy.
  2. From the Configurations dropdown, enter new values for the configurations you want to override.
  3. Enter values for all other required or desired settings.
  4. Click Deploy within the deployment dialog.

The new value only overrides the original value for the deployment where you’ve configured it. For users who access the flow at its deployment URL, the new value applies.

When you return to the flow, its configuration keeps the original value. If you deploy the flow a second time, Postman restores the original value, because overrides you make in one deployment don’t automatically carry over into subsequent deployments.

Use environment variables in configurations

When you first create and test requests in a collection, you’ll typically use environment variables. When you use those same requests in a flow, you can reuse those environment variables in your configurations. You can also define variables in your configurations and save them to existing or new environments.

You can’t access configurations from pre- or post-request scripts in HTTP requests.