You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Credential block selects a stored credential once and passes its ID to any downstream block that requires authentication. The credential is resolved securely at execution time — no secrets are exposed in the workflow state or logs.
10
+
The Credential block has two operations: **Select Credential** picks a single stored credential and outputs its ID reference for downstream blocks; **List Credentials** returns all credentials in the workspace (optionally filtered by type) as an array for iteration.
11
11
12
12
<divclassName="flex justify-center">
13
13
<Image
14
14
src="/static/blocks/credential.png"
15
15
alt="Credential Block"
16
-
width={500}
17
-
height={400}
16
+
width={400}
17
+
height={300}
18
18
className="my-6"
19
19
/>
20
20
</div>
21
21
22
22
<Callout>
23
-
The Credential block outputs a credential **ID reference**, not the secret itself. Downstream blocks receive the ID and resolve it securely during their own execution.
23
+
The Credential block outputs credential **ID references**, not secrets. Downstream blocks receive the ID and resolve it securely during their own execution.
24
24
</Callout>
25
25
26
26
## Configuration Options
27
27
28
-
### Credential
28
+
### Operation
29
+
30
+
| Value | Description |
31
+
|---|---|
32
+
|**Select Credential**| Pick one credential and output its reference — use this to wire a single credential into downstream blocks |
33
+
|**List Credentials**| Return all workspace credentials as an array — use this with a ForEach loop |
34
+
35
+
### Credential (Select operation)
29
36
30
37
Select a credential from your workspace. The dropdown shows all credential types you have access to, grouped by category:
31
38
@@ -35,20 +42,61 @@ Select a credential from your workspace. The dropdown shows all credential types
35
42
36
43
In advanced mode, paste a credential ID directly. You can copy a credential ID from your workspace's Credentials settings page.
37
44
45
+
### Type Filter (List operation)
46
+
47
+
Filter the returned credentials by type. Defaults to **All**.
48
+
49
+
| Value | Description |
50
+
|---|---|
51
+
|**All**| Return all credential types |
52
+
|**OAuth**| Connected OAuth accounts only |
53
+
|**Env Variables (Workspace)**| Workspace environment variables only |
54
+
|**Env Variables (Personal)**| Personal environment variables only |
55
+
|**Service Accounts**| Google service account keys only |
56
+
57
+
### Provider (List operation, OAuth only)
58
+
59
+
Further filter 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 providers.
60
+
61
+
| Example | Returns |
62
+
|---|---|
63
+
| Gmail | Gmail credentials only |
64
+
| Slack | Slack credentials only |
65
+
| Gmail + Slack | Gmail and Slack credentials |
66
+
38
67
## Outputs
39
68
40
-
| Output | Type | Description |
41
-
|---|---|---|
42
-
|`credentialId`|`string`| The credential ID — pipe this into other blocks' credential fields |
43
-
|`displayName`|`string`| Human-readable name (e.g. "waleed@company.com") |
1. Drop a **Credential** block and select your credential from the picker
68
133
2. In the downstream block, switch to **advanced mode** on its credential field
69
134
3. Enter `<credentialBlockName.credentialId>` as the value
@@ -90,17 +155,28 @@ Agent (Determine account) → Condition → Credential A or Credential B → Sla
90
155
</Tab>
91
156
</Tabs>
92
157
158
+
### List Credentials
159
+
160
+
1. Drop a **Credential** block, set Operation to **List Credentials**
161
+
2. Optionally set a **Type Filter** (e.g. OAuth only)
162
+
3. Optionally select one or more **Providers** to narrow results (only your connected providers appear)
163
+
4. Wire `<credentialBlockName.credentials>` into a **ForEach Loop** as the items source
164
+
5. Inside the loop, reference `<loop.currentItem.credentialId>` in downstream blocks' credential fields
165
+
93
166
## Best Practices
94
167
95
168
-**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
96
169
-**Outputs are safe to log**: The `credentialId` output is a UUID reference, not a secret. It is safe to inspect in execution logs
97
170
-**Use for environment switching**: Pair with a Condition block to route to a production or staging credential based on a workflow variable
98
171
-**Advanced mode is required**: Downstream blocks must be in advanced mode on their credential field to accept a dynamic reference
172
+
-**Use List + ForEach for fan-out**: When you need to run the same action across all accounts of a type, List Credentials feeds naturally into a ForEach loop
173
+
-**Narrow by provider**: Use the Provider multiselect to filter to specific services — only providers you have credentials for are shown
99
174
100
175
<FAQitems={[
101
176
{ question: "Does the Credential block expose my secret or token?", answer: "No. The block outputs a credential ID (a UUID), not the actual secret or token. Downstream blocks receive the ID and resolve it securely in their own execution context. Secrets never appear in workflow state, logs, or the canvas." },
102
177
{ question: "What credential types does it support?", answer: "All credential types: OAuth connected accounts, workspace environment variables, personal environment variables, and Google service accounts." },
103
-
{ question: "How is this different from just copying a credential ID into advanced mode?", answer: "Functionally identical — both pass the same credential ID to the downstream block. The Credential block adds value when you need to use one credential in many blocks (change it once), or when you want to select between credentials dynamically using a Condition block." },
178
+
{ question: "How is Select different from just copying a credential ID into advanced mode?", answer: "Functionally identical — both pass the same credential ID to the downstream block. The Credential block adds value when you need to use one credential in many blocks (change it once), or when you want to select between credentials dynamically using a Condition block." },
179
+
{ question: "Can I list all credentials in my workspace?", answer: "Yes. Set the Operation to 'List Credentials'. You can optionally filter by type (OAuth, environment variables, service accounts). Wire the credentials output into a ForEach loop to process each credential individually." },
104
180
{ question: "Can I use a Credential block output in a Function block?", answer: "Yes. Reference <credential.credentialId> in your Function block's code. Note that the function will receive the raw UUID string — if you need the resolved token, the downstream block must handle the resolution (as integration blocks do). The Function block does not automatically resolve credential IDs." },
105
-
{ question: "What happens if the credential is deleted?", answer: "The block will throw an error at execution time: 'Credential not found or access denied'. Update the Credential block to select a valid credential before re-running." },
181
+
{ question: "What happens if the credential is deleted?", answer: "The Select operation will throw an error at execution time: 'Credential not found'. The List operation will simply omit the deleted credential from the results. Update the Credential block to select a valid credential before re-running." },
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx
+4-9Lines changed: 4 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -59,14 +59,10 @@ interface ComboBoxProps {
59
59
/** Configuration for the sub-block */
60
60
config: SubBlockConfig
61
61
/** Async function to fetch options dynamically */
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/dropdown/dropdown.tsx
+4-9Lines changed: 4 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -52,14 +52,10 @@ interface DropdownProps {
52
52
/** Enable multi-select mode */
53
53
multiSelect?: boolean
54
54
/** Async function to fetch options dynamically */
0 commit comments