Skip to content

Commit 924faf1

Browse files
committed
more info
1 parent 1c334aa commit 924faf1

24 files changed

Lines changed: 350 additions & 188 deletions
Lines changed: 50 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,203 +1,121 @@
11
---
2-
title: Credentials
3-
description: Manage secrets, API keys, and OAuth connections for your workflows
2+
title: Secrets
3+
description: Manage API keys and environment variables for your workflows
44
---
55

66
import { Callout } from 'fumadocs-ui/components/callout'
77
import { Image } from '@/components/ui/image'
8-
import { Step, Steps } from 'fumadocs-ui/components/steps'
98
import { FAQ } from '@/components/ui/faq'
109

11-
Credentials provide a secure way to manage API keys, tokens, and third-party service connections across your workflows. Instead of hardcoding sensitive values into your workflow, you store them as credentials and reference them at runtime.
10+
Secrets are key-value pairs that store sensitive data like API keys, tokens, and passwords. Instead of hardcoding values into your workflows, you store them as secrets and reference them by name at runtime.
1211

13-
Sim supports two categories of credentials: **secrets** for static values like API keys, and **OAuth accounts** for authenticated service connections like Google or Slack.
12+
## Managing Secrets
1413

15-
## Getting Started
16-
17-
To manage credentials, open your workspace **Settings** and navigate to the **Secrets** tab.
14+
To manage secrets, open your workspace **Settings** and navigate to the **Secrets** tab.
1815

1916
<Image
20-
src="/static/credentials/settings-secrets.png"
21-
alt="Settings modal showing the Secrets tab with a list of saved credentials"
17+
src="/static/secrets/secrets-list.png"
18+
alt="Secrets tab showing Workspace and Personal sections with inline key-value rows"
2219
width={700}
23-
height={200}
20+
height={500}
2421
/>
2522

26-
From here you can search, create, and delete both secrets and OAuth connections.
23+
Secrets are organized into two sections:
2724

28-
## Secrets
25+
- **Workspace** — shared with all members of your workspace
26+
- **Personal** — private to you
2927

30-
Secrets are key-value pairs that store sensitive data like API keys, tokens, and passwords. Each secret has a **key** (used to reference it in workflows) and a **value** (the actual secret).
28+
### Adding a Secret
3129

32-
### Creating a Secret
30+
Type a key name (e.g. `OPENAI_API_KEY`) into the **Key** column and its value into the **Value** column in the last empty row. A new empty row appears automatically as you type. Existing values are masked by default.
3331

34-
<Image
35-
src="/static/credentials/create-secret.png"
36-
alt="Create Secret dialog with fields for key, value, description, and scope toggle"
37-
width={500}
38-
height={400}
39-
/>
32+
When you're done, click **Save** to persist all changes.
33+
34+
<Callout type="info">
35+
Keys must use only letters, numbers, and underscores — no spaces or special characters.
36+
</Callout>
37+
38+
### Bulk Import
39+
40+
You can populate multiple secrets at once by pasting `.env`-style content directly into any value field. The parser supports standard `KEY=VALUE` pairs, quoted values, comments (`#`), and blank lines.
41+
42+
### Editing and Deleting
43+
44+
Click directly into any key or value cell to edit it. To delete a secret, click the trash icon on its row and save.
45+
46+
## Using Secrets in Workflows
4047

41-
<Steps>
42-
<Step>
43-
Click **+ Add** and select **Secret** as the type
44-
</Step>
45-
<Step>
46-
Enter a **Key** name (letters, numbers, and underscores only, e.g. `OPENAI_API_KEY`)
47-
</Step>
48-
<Step>
49-
Enter the **Value**
50-
</Step>
51-
<Step>
52-
Optionally add a **Description** to help your team understand what the secret is for
53-
</Step>
54-
<Step>
55-
Choose the **Scope** — Workspace or Personal
56-
</Step>
57-
<Step>
58-
Click **Create**
59-
</Step>
60-
</Steps>
61-
62-
### Using Secrets in Workflows
63-
64-
To reference a secret in any input field, type `{{` to open the dropdown. It will show your available secrets grouped by scope.
48+
To reference a secret in any input field, type `{{` to open the variable dropdown. Your available secrets are listed grouped by scope (workspace, then personal).
6549

6650
<Image
6751
src="/static/credentials/secret-dropdown.png"
68-
alt="Typing {{ in a code block opens a dropdown showing available workspace secrets"
52+
alt="Typing {{ in an input opens a dropdown showing available secrets"
6953
width={400}
7054
height={250}
7155
/>
7256

73-
Select the secret you want to use. The reference will appear highlighted in blue, indicating it will be resolved at runtime.
57+
Select the secret you want to use. The reference appears highlighted in blue and is resolved to its actual value at runtime.
7458

7559
<Image
7660
src="/static/credentials/secret-resolved.png"
77-
alt="A resolved secret reference shown in blue text as {{OPENAI_API_KEY}}"
61+
alt="A resolved secret reference shown as {{OPENAI_API_KEY}}"
7862
width={400}
7963
height={200}
8064
/>
8165

8266
<Callout type="warn">
83-
Secret values are never exposed in the workflow editor or logs. They are only resolved during execution.
67+
Secret values are never exposed in the workflow editor or execution logs — they are only resolved during execution.
8468
</Callout>
8569

86-
### Bulk Import
87-
88-
You can import multiple secrets at once by pasting `.env`-style content:
89-
90-
1. Click **+ Add**, then switch to **Bulk** mode
91-
2. Paste your environment variables in `KEY=VALUE` format
92-
3. Choose the scope for all imported secrets
93-
4. Click **Create**
94-
95-
The parser supports standard `KEY=VALUE` pairs, quoted values, comments (`#`), and blank lines.
70+
## Secret Details
9671

97-
## OAuth Accounts
98-
99-
OAuth accounts are authenticated connections to third-party services like Google, Slack, GitHub, and more. Sim handles the OAuth flow, token storage, and automatic refresh.
100-
101-
You can connect **multiple accounts per provider** — for example, two separate Gmail accounts for different workflows.
102-
103-
### Connecting an OAuth Account
72+
Click **Details** on any secret row to open its detail view.
10473

10574
<Image
106-
src="/static/credentials/create-oauth.png"
107-
alt="Create Secret dialog with OAuth Account type selected, showing display name and provider dropdown"
108-
width={500}
75+
src="/static/secrets/secret-details.png"
76+
alt="Secret details view showing Display Name, Description, and Members sections"
77+
width={700}
10978
height={400}
11079
/>
11180

112-
<Steps>
113-
<Step>
114-
Click **+ Add** and select **OAuth Account** as the type
115-
</Step>
116-
<Step>
117-
Enter a **Display name** to identify this connection (e.g. "Work Gmail" or "Marketing Slack")
118-
</Step>
119-
<Step>
120-
Optionally add a **Description**
121-
</Step>
122-
<Step>
123-
Select the **Account** provider from the dropdown
124-
</Step>
125-
<Step>
126-
Click **Connect** and complete the authorization flow
127-
</Step>
128-
</Steps>
129-
130-
### Using OAuth Accounts in Workflows
131-
132-
Blocks that require authentication (e.g. Gmail, Slack, Google Sheets) display a credential selector dropdown. Select the OAuth account you want the block to use.
81+
From here you can:
13382

134-
<Image
135-
src="/static/credentials/oauth-selector.png"
136-
alt="Gmail block showing the account selector dropdown with a connected account and option to connect another"
137-
width={500}
138-
height={350}
139-
/>
140-
141-
You can also connect additional accounts directly from the block by selecting **Connect another account** at the bottom of the dropdown.
83+
- Edit the **Display Name** and **Description**
84+
- Manage **Members** — invite teammates by email and assign them an **Admin** or **Member** role
14285

143-
<Callout type="info">
144-
If a block requires an OAuth connection and none is selected, the workflow will fail at that step.
145-
</Callout>
86+
Click **Save** to apply changes, or **Back** to return to the list.
14687

14788
## Workspace vs. Personal
14889

149-
Credentials can be scoped to your **workspace** (shared with your team) or kept **personal** (private to you).
150-
15190
| | Workspace | Personal |
15291
|---|---|---|
15392
| **Visibility** | All workspace members | Only you |
15493
| **Use in workflows** | Any member can use | Only you can use |
15594
| **Best for** | Production workflows, shared services | Testing, personal API keys |
15695
| **Who can edit** | Workspace admins | Only you |
157-
| **Auto-shared** | Yes — all members get access on creation | No — only you have access |
15896

15997
<Callout type="info">
160-
When a workspace and personal secret share the same key name, the **workspace secret takes precedence**.
98+
When a workspace secret and a personal secret share the same key name, the **workspace secret takes precedence**.
16199
</Callout>
162100

163101
### Resolution Order
164102

165-
When a workflow runs, Sim resolves secrets in this order:
103+
When a workflow runs, secrets resolve in this order:
166104

167105
1. **Workspace secrets** are checked first
168106
2. **Personal secrets** are used as a fallback — from the user who triggered the run (manual) or the workflow owner (automated runs via API, webhook, or schedule)
169107

170-
## Access Control
171-
172-
Each credential has role-based access control:
173-
174-
- **Admin** — can view, edit, delete, and manage who has access
175-
- **Member** — can use the credential in workflows (read-only)
176-
177-
When you create a workspace secret, all current workspace members are automatically granted access. Personal secrets are only accessible to you by default.
178-
179-
### Sharing a Credential
180-
181-
To share a credential with specific team members:
182-
183-
1. Click **Details** on the credential
184-
2. Invite members by email
185-
3. Assign them an **Admin** or **Member** role
186-
187108
## Best Practices
188109

189-
- **Use workspace credentials for production** so workflows work regardless of who triggers them
190-
- **Use personal credentials for development** to keep your test keys separate
110+
- **Use workspace secrets for production** so workflows work regardless of who triggers them
111+
- **Use personal secrets for development** to keep test keys separate
191112
- **Name keys descriptively**`STRIPE_SECRET_KEY` over `KEY1`
192-
- **Connect multiple OAuth accounts** when you need different permissions or identities per workflow
193113
- **Never hardcode secrets** in workflow input fields — always use `{{KEY}}` references
194114

195115
<FAQ items={[
196-
{ question: "Are my secrets encrypted at rest?", answer: "Yes. Secret values and OAuth tokens are encrypted before being stored in the database. The platform uses server-side encryption so that raw secret values are never persisted in plaintext. Secret values are also never exposed in the workflow editor, logs, or API responses." },
197-
{ question: "What happens if both a workspace secret and a personal secret have the same key name?", answer: "The workspace secret takes precedence. During execution, the resolver checks workspace secrets first and uses personal secrets only as a fallback. This ensures that production workflows use the shared, team-managed value." },
116+
{ question: "Are my secrets encrypted at rest?", answer: "Yes. Secret values are encrypted before being stored in the database using server-side encryption, so raw values are never persisted in plaintext. They are also never exposed in the workflow editor, logs, or API responses." },
117+
{ question: "What happens if both a workspace secret and a personal secret have the same key name?", answer: "The workspace secret takes precedence. During execution, the resolver checks workspace secrets first and uses personal secrets only as a fallback. This ensures production workflows use the shared, team-managed value." },
198118
{ question: "Who determines which personal secret is used for automated runs?", answer: "For manual runs, the personal secrets of the user who clicked Run are used as fallback. For automated runs triggered by API, webhook, or schedule, the personal secrets of the workflow owner are used instead." },
199-
{ question: "Does Sim handle OAuth token refresh automatically?", answer: "Yes. When an OAuth token is used during execution, the platform checks whether the access token has expired and automatically refreshes it using the stored refresh token before making the API call. You do not need to handle token refresh manually." },
200-
{ question: "Can I connect multiple OAuth accounts for the same provider?", answer: "Yes. You can connect multiple accounts per provider (for example, two separate Gmail accounts). Each block that requires OAuth lets you select which specific account to use from the credential dropdown. This is useful when different workflows or blocks need different permissions or identities." },
201-
{ question: "What happens if I delete a credential that is used in a workflow?", answer: "If a block references a deleted credential, the workflow will fail at that block during execution because the credential cannot be resolved. Make sure to update any blocks that reference a credential before deleting it." },
202-
{ question: "Can I import secrets from a .env file?", answer: "Yes. The bulk import feature lets you paste .env-style content in KEY=VALUE format. The parser supports quoted values, comments (lines starting with #), and blank lines. All imported secrets are created with the scope you choose (workspace or personal)." },
119+
{ question: "Can I import secrets from a .env file?", answer: "Yes. Paste .env-style content (KEY=VALUE format) directly into a value field and the secrets will be auto-populated. The parser supports quoted values, comments (lines starting with #), and blank lines." },
120+
{ question: "What happens if I delete a secret that is used in a workflow?", answer: "The workflow will fail at any block that references the deleted secret during execution because the value cannot be resolved. Update any references before deleting a secret." },
203121
]} />
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "Credentials",
3-
"pages": ["index", "google-service-account"],
2+
"title": "Secrets",
3+
"pages": ["index"],
44
"defaultOpen": false
55
}

apps/docs/content/docs/en/credentials/google-service-account.mdx renamed to apps/docs/content/docs/en/integrations/google-service-account.mdx

File renamed without changes.

0 commit comments

Comments
 (0)