Secrets
Secrets store credentials such as API keys, passwords, and bot tokens as encrypted values. They belong to your organization, so you can reuse one secret across multiple workflows. Workflow steps reference the secret’s name instead of storing the credential in their settings.
Save a secret
- Open Workflows and click Variables & secrets beside New workflow.
- Select the Secret Variables tab. You can also open Secret Variables directly.
- Click Create Secret.
- Enter a Name, such as
crm_api_key, and paste the credential into Value. - Click Create Secret to save it. The table shows its name, reference, creation time, and last rotation time.
Secret names must start with a lowercase letter, contain only lowercase letters and underscores, and be at most 64 characters long.
Numbers, spaces, and hyphens are not supported.
Use a unique name within your organization.
Enter just the name, such as crm_api_key, rather than secret.crm_api_key.
Secret values are write-only. After saving, you can see the name and reference, but you cannot reveal or copy the saved value. To replace a credential, use Rotate.
Create or select a secret inside a node
Credential fields such as Bot Token in Slack nodes and API Key in JotForm Submit have a Select a secret dropdown.
- Open the node’s settings and open its secret dropdown.
- Select an existing secret, or choose Create secret….
- If creating one, fill in Name and Value, then click Create Secret. The new secret is saved and automatically selected for that field.
The new secret also becomes available in the other secret pickers in the builder. It is saved to your organization immediately, independently of publishing the workflow. Choose Manage secrets from the dropdown to open the Secret Variables page in a new browser tab while keeping the builder open.
These fields require secret references. A plaintext credential or a public variable will not satisfy that requirement.
Use a secret in an expression
Fields that support expressions, including HTTP headers, can reference secrets too. Select the secret from the variable picker, or use its reference in an expression:
For an HTTP service that uses a bearer token:
-
Save the token as
crm_api_keyusing the steps above. -
Open an HTTP Request node.
-
Under Headers, click Add and enter
Authorizationas the header name. -
Switch the header value’s mode to CEL only, click Edit expression, and enter:
Apply the expression in the editor to save it to the field.
Use the authentication format required by the service you are calling.
For a header that expects the API key alone, use secret.crm_api_key without the bearer prefix.
See Call an API for the rest of the workflow.
Rotate a secret
Rotate a secret when you need to replace its stored credential while keeping the same name.
- Open Workflows > Variables & secrets > Secret Variables.
- Find the secret and click Rotate.
- Paste the replacement credential into Value.
- Click Rotate to save it.
Every workflow referencing that name uses the same secret, so a rotation affects all of them. Rotating in Gail updates the stored value; it does not generate or revoke a credential at the external service.
Runs already in progress keep the values they started with. New manually started, webhook, and debug runs use the updated secret once the change takes effect. Scheduled workflows keep the snapshot from their last publication, so republish scheduled workflows after rotating a secret they use.
Delete a secret or change its name
To delete a secret, click Delete on its row, then confirm with Delete in the dialog. Workflows that still reference it can fail when they next try to use it.
There is no rename action. To change a name, create a secret with the new name, update the fields that use it, test and publish the affected workflows, then delete the old secret. Because saved values cannot be read back, you will need to supply the credential again when creating the replacement.