- The runtime API (
secrets.set,secrets.get,secrets.delete) for automations. - The Settings → Secrets form in the Builder UI, which is where workspace-level secrets are typically configured before any automation runs.
Settings → Secrets form
Open Settings → Secrets in the Builder. The form has two sections.Schema-defined secrets
The top section is generated from the workspace’s secret schema, declared inindex.yml:
{{secret.<name>}}, and someone (usually the workspace author) committed the schema to source control.
Typing a value and clicking Save Secrets posts the new values to POST /workspaces/{id}/secrets. Values are stored encrypted; the form never reads back plaintext (an empty field means “leave the existing value untouched”, not “clear the value”).
Additional Secrets form
The “Additional Secrets” section underneath is for secrets that are not declared in the schema. The label “Additional” is intentional: these are extras beyond the schema-defined set.
Use the Additional form when:
- You are prototyping and have not yet committed a schema.
- You need an environment-specific override (e.g. a per-deploy webhook URL) that should not appear in source.
- You want a one-off value usable from a single automation without touching
index.yml.
Runtime API
For automations that need to create or rotate secrets at runtime (OAuth tokens, refresh tokens, per-user credentials), thesecrets module exposes set, get, and delete.
How it works
secrets.setandsecrets.getreturn an opaque secret reference (a$secret:...string), not the actual value.- When this reference is used inside a
fetchinstruction (in the URL, headers, body, query, or auth fields), the platform automatically resolves it to the real value just before the HTTP call. - The resolved value is redacted from all logs and events.
secrets.get right before using the reference; do not store it for later reuse.
Scopes
Functions
set: Store or update a secret
Returns a
$secret:... reference string. If a secret with the same name and scope already exists, it is updated.
get: Retrieve a secret reference
Returns a
$secret:... reference string, or { error: "not_found" } if the secret does not exist (or has expired).
delete: Remove a secret
Returns
{ deleted: true } on success, or { error: "not_found" }.
Using secret references in fetch
Pass the reference returned byset or get wherever a sensitive value is needed in a fetch instruction. The platform resolves it transparently:
fetch fields: url, headers, body, query, and auth (including auth.awsv4).
Complete example: storing and using an OAuth token
Error handling
All three functions return an error object instead of throwing when the error is actionable:
Use
onError or a conditions block to handle these: