Credential Block
Retrieve OAuth credentials stored in your account
The Credential block looks up OAuth credentials stored in your account, either by their unique ID or by listing all credentials for a given provider. Reach for it when a workflow needs to select credentials dynamically at runtime instead of hard-coding secrets.
Overview
| Property | Value |
|---|---|
| Type | credential |
| Category | blocks |
| Color | #3B82F6 |
When to Use
- Resolve a stored OAuth credential to its access token for use in a downstream API call.
- Dynamically pick a credential by ID that was supplied earlier in the workflow.
- List all credentials tied to a specific provider (e.g.
google,github) to drive branching logic. - Count how many credentials of a provider are available before deciding how to proceed.
- Avoid hard-coding secrets by referencing credentials by their stored ID instead.
- Pass
{{credential_1.token}}directly into an HTTP block's authorization header.
Configuration
Operation
Required. Choose what the block does. Defaults to select.
| Option | ID |
|---|---|
| Select credential by ID | select |
| List credentials by provider | list |
Credential ID
Shown when Operation is select. Required for that operation.
The unique identifier of the OAuth credential to retrieve (format: cred_xxxxxxxxxxxxxxxx).
Provider Filter
Shown when Operation is list. Optional.
A provider ID used to filter the returned credentials (e.g. google, github). When omitted all credentials are returned.
Inputs & Outputs
Inputs
operation(string) — Operation to perform:selectorlistcredentialId(string) — ID of the credential to retrieve (forselectoperation)provider(string) — Provider ID to filter credentials (forlistoperation)
Outputs
credentialId(string) — The credential ID (select operation)displayName(string) — Human-readable name of the credential (select operation)providerId(string) — OAuth provider identifier (select operation)token(string) — Access token for the credential (select operation)credentials(json) — Array of credentials matching the filter (list operation)count(number) — Total number of credentials returned (list operation)
Tools
This block has no external tool dependencies (tools.access is empty). It is handled internally by the Credential executor handler and does not call the tool registry.
YAML Example
# Example: retrieve a single credential by ID
credential_1:
type: credential
name: "Credential"
inputs:
operation: "select"
credentialId: "cred_xxxxxxxxxxxxxxxx"
connections:
outgoing:
- target: next-block-id
# Example: list all Google credentials
credential_2:
type: credential
name: "List Google Credentials"
inputs:
operation: "list"
provider: "google"
connections:
outgoing:
- target: next-block-id