Credential

The Credential block has two operations: Select Credential picks a single OAuth credential and outputs its ID reference for downstream blocks; List Credentials returns all OAuth credentials in the workspace (optionally filtered by provider) as an array for iteration.

Credential Block

The Credential block outputs credential ID references, not secrets. Downstream blocks receive the ID and resolve the actual OAuth token securely during their own execution.

Configuration Options

Operation

ValueDescription
Select CredentialPick one OAuth credential and output its reference — use this to wire a single credential into downstream blocks
List CredentialsReturn all OAuth credentials in the workspace as an array — use this with a ForEach loop

Credential (Select operation)

Select an OAuth credential from your workspace. The dropdown shows all connected OAuth accounts (Google, GitHub, Slack, etc.).

In advanced mode, paste a credential ID directly. You can copy a credential ID from your workspace's Credentials settings page.

Provider (List operation)

Filter the returned OAuth credentials by provider. Select one or more providers from the dropdown — only providers you have credentials for will appear. Leave empty to return all OAuth credentials.

ExampleReturns
GmailGmail credentials only
SlackSlack credentials only
Gmail + SlackGmail and Slack credentials

Outputs

OutputTypeDescription
credentialIdstringThe credential ID — pipe this into other blocks' credential fields
displayNamestringHuman-readable name (e.g. "waleed@company.com")
providerIdstringOAuth provider ID (e.g. google-email, slack)
OutputTypeDescription
credentialsjsonArray of OAuth credential objects (see shape below)
countnumberNumber of credentials returned

Each object in the credentials array:

FieldTypeDescription
credentialIdstringThe credential ID
displayNamestringHuman-readable name
providerIdstringOAuth provider ID

Example Use Cases

Shared credential across multiple blocks — Define once, use everywhere

Credential (Select, Google) → Gmail (Send) & Google Drive (Upload) & Google Calendar (Create)

Multi-account workflows — Route to different credentials based on logic

Agent (Determine account) → Condition → Credential A or Credential B → Slack (Post)

Iterate over all Gmail accounts

Credential (List, Provider: Gmail) → ForEach Loop → Gmail (Send) using <loop.currentItem.credentialId>
Credential List wired into a ForEach Loop

How to wire a Credential block

Select Credential

  1. Drop a Credential block and select your OAuth credential from the picker
  2. In the downstream block, switch to advanced mode on its credential field
  3. Enter <credentialBlockName.credentialId> as the value

In the Gmail block's credential field (advanced mode):

<myCredential.credentialId>

In the Slack block's credential field (advanced mode):

<myCredential.credentialId>

List Credentials

  1. Drop a Credential block, set Operation to List Credentials
  2. Optionally select one or more Providers to narrow results (only your connected providers appear)
  3. Wire <credentialBlockName.credentials> into a ForEach Loop as the items source
  4. Inside the loop, reference <loop.currentItem.credentialId> in downstream blocks' credential fields

Best Practices

  • Define once, reference many times: When five blocks use the same Google account, use one Credential block and wire all five to <credential.credentialId> instead of selecting the account five times
  • Outputs are safe to log: The credentialId output is a UUID reference, not a secret. It is safe to inspect in execution logs
  • Use for environment switching: Pair with a Condition block to route to a production or staging OAuth credential based on a workflow variable
  • Advanced mode is required: Downstream blocks must be in advanced mode on their credential field to accept a dynamic reference
  • Use List + ForEach for fan-out: When you need to run the same action across all accounts of a provider, List Credentials feeds naturally into a ForEach loop
  • Narrow by provider: Use the Provider multiselect to filter to specific services — only providers you have credentials for are shown

Common Questions

On this page

Start building today
Trusted by over 100,000 builders.
The open-source platform to build AI agents and run your agentic workforce.
Get started