What are Credentials?
Credentials are encrypted key-value pairs that allow you to securely store sensitive information like API keys, tokens, and secrets. Instead of hardcoding sensitive values in your workflow code, you can reference them by name and the system will securely inject them at runtime.Why Use Credentials?
| Without Credentials | With Credentials |
|---|---|
| API keys hardcoded in code | Values stored encrypted, referenced by name |
| Risk of accidentally exposing secrets | Secrets never visible in logs or UI |
| Difficult to rotate keys | Easy rotation without changing code |
| Same key repeated across workflows | Single source of truth for all workflows |
Managing Credentials
Accessing Credentials Settings
Navigate to Workspace Settings → Credentials to manage your workspace credentials.
Creating a Credential
- Click Add Credential
- Enter a Key (identifier you’ll use in code, e.g.,
SLACK_BOT_TOKEN) - Enter the Value (the actual secret)
- Click Save
The credential value is encrypted before storage. Once saved, you cannot view the value again — you can only update or delete it.
Credential Key Naming
Choose descriptive, consistent names for your credential keys:Updating a Credential (Rotation)
To rotate a credential:- Find the credential in the list
- Click Edit
- Enter the new value
- Click Save
Deleting a Credential
Using Credentials in Code Execution
In Code Execution steps, use thecredential() function to retrieve secret values at runtime.
JavaScript/TypeScript
Using Credentials in Agents
When a workflow executes an Agent step, all workspace credentials are automatically available to the agent. You can instruct the agent to use a specific credential by referencing its name in your prompt or agent configuration. For example, you can tell the agent: “Use the SLACK_BOT_TOKEN credential to send a message to the #general channel.”Credentials are inherited from the workflow’s scope. The agent receives the same credentials available to the workflow that triggered it.
How Credentials Work at Runtime
When a workflow step executes:- The system resolves all available credentials for the workspace
- Credentials are decrypted and injected into the step’s runtime environment
- The
credential()function reads from this secure context - Credential values are kept in memory only — never persisted in logs, outputs, or state
The system uses best-effort masking to prevent credential values from appearing in logs. However, if your code explicitly prints a credential value, it may still be visible.
Credential Scopes
Credentials are defined at the workspace level, meaning they’re available to all workflows in the workspace.How Resolution Works
When your code callscredential("KEY"):
- The system looks for a credential with that key in the workspace
- If found, the decrypted value is returned
- If not found, the step fails with a
missing_credentialerror
Coming soon: Override credentials at the workflow or agent level, allowing you to use different values for specific workflows while keeping workspace defaults.
Security Considerations
Encryption
All credential values are encrypted using AES-256-GCM before storage. Values are only decrypted at the moment of execution and kept in memory for the minimum time necessary.Access Control
- Only workspace administrators can create, update, or delete credentials
- Users with workflow edit/execute permissions can reference credentials by key, but cannot view values
Error Handling
Missing Credential
If your code references a credential that doesn’t exist:Best Practice: Validate Early
Check for required credentials at the start of your code:Best Practices
Do
- Use descriptive, consistent key names
- Rotate credentials periodically
- Use separate credentials for different services
- Test workflows after credential rotation
- Document what each credential is used for
Don't
- Hardcode secrets in workflow code
- Log or print credential values
- Share credential values outside the system
- Use the same credential for multiple purposes
- Delete credentials without checking dependencies
Frequently Asked Questions
Can I see a credential's value after creating it?
Can I see a credential's value after creating it?
No. For security reasons, credential values cannot be retrieved after creation. You can only update (overwrite) or delete them.
What happens if I rotate a credential during a workflow run?
What happens if I rotate a credential during a workflow run?
Each step resolves credentials at execution time. If a credential is rotated mid-run, subsequent steps will use the new value. Already-executing steps continue with the value they retrieved.
Can I use credentials in workflow configuration?
Can I use credentials in workflow configuration?
Credentials are available in Code Execution steps and Agent steps via the
credential() function. They cannot be used in workflow configuration fields or template strings.Is there a limit on the number of credentials?
Is there a limit on the number of credentials?
There’s no strict limit, but we recommend keeping credentials organized and removing unused ones to maintain clarity.
Are credentials shared across workspaces?
Are credentials shared across workspaces?
What if my credential value is very long?
What if my credential value is very long?
Credential values can be up to 64KB. For larger secrets, consider storing them in a dedicated secret manager and using a credential to store the access token.
Summary
| Feature | Description |
|---|---|
| Storage | Encrypted key-value pairs in workspace settings |
| Access | Via credential("KEY") function in Code Execution and Agents |
| Scope | Workspace-level (all workflows can access) |
| Security | AES-256-GCM encryption, never logged or exposed |
| Management | Create, update (rotate), delete via Workspace Settings |