Secrets are configuration strings that store sensitive data. For example, a token to access a 3rd party is a secret, since it is a sensitive value that should not be exposed in plain text.
In addition, secrets often differ between environments; For example, an endpoint for an HTTP call may have one value in Production, and a different value in Staging;
When the state machine is executed in STAGING environment, you want the state to make a call to
https://staging.somehost.com, while in the PRODUCTION environment you might want the state to make a call to
Same goes for other values like tokens, keys and more.
All of these values are environment-dependant, and so to use them you might need to familiarize yourself with the Secrets section of the platform.
As you can see, there are multiple tabs; one tab per environment.
Every environment will have its own secrets, and they will never "bleed" between each other. If you need multiple environments to use the same secret value, this is perfectly fine, however ensure that all those environments have their own records (under the respective tab) before running an execution in that environment.
So following the example from above, we might navigate to the "staging" tab and specify the following secret:
We can then navigate to the "production" tab, and specify the following secret:
Then, let's say we need to use this secret in one of the states of our flow, specifically a state that makes an HTTP call. Let's assume we need this value to be in the Endpoint configuration.
To use it, we would go to the state's configuration, and specify the secret like so:
And then, if we execute the state machine in "staging" environment, the actual value during execution will be
And if we execute the same state machine in "production" environment, the actual value during execution will be