Skip to main content
Environment variables are saved secrets for your workspace, such as another service’s API key or token. You save the secret once in Settings. Then you put a reference to it, such as {{connie.env.STRIPE_API_KEY}}, in a workflow step, instead of pasting the real key into the step.
Before opening Connie Settings: while a new workspace’s first run is unfinished, Settings sends you back to it: answer its two questions, then reopen Settings. Direct Settings links follow the same check. New workspaces start with a free setup with Sam, with no card or trial. Billing (?tab=plans) remains available during setup. See Settings access during setup.
Why it matters: the real value is never shown in your workflow, its run history or the chat. Anyone building workflows can use the secret without ever seeing it. To change the key later, you update it in one place. Where: Settings → Developers → Environment · https://connie.ai/<workspace-id>/settings?tab=env

Add a variable

Owners and admins only. Members can view the saved variable names and descriptions, but Add variable is disabled and edit/delete actions are hidden. The page explains “Only workspace owners and admins can add, edit, or delete variables.” Controls stay disabled while Connie checks your role, and the permission notice appears only after that check finishes.
1

Open Environment

Go to Settings → Environment (under Developers). The page is headed Environment variables.
2

Click Add variable

The Add variable dialog opens.
3

Fill in the fields

  • Name: for example STRIPE_API_KEY. Use letters, numbers and underscores, starting with a letter or underscore (up to 128 characters). Under the field: “Letters, numbers and _ only. Use it as {{connie.env.NAME}}.” An invalid name is flagged as you type (“Use letters, numbers and underscores, and start with a letter or underscore.”, or “Keep the name to 128 characters or fewer.”) and Create stays disabled until it’s fixed.
  • Value: the secret itself (up to 8,192 characters). Single-line values are masked. Choose Use multiline value, or paste several lines, to edit a multiline value with its line breaks preserved. Multiline values are visible while editing; saved values remain write-only. The same options apply when replacing a value with Edit.
  • Description (Optional): what it’s for, for example “Stripe key for invoice workflow” (up to 256 characters).
4

Create

Click Create. You’ll see Added "STRIPE_API_KEY". The row shows the name, the date and ∗∗∗ instead of the value.
After you save a value, it’s never shown again, not even to admins. Keep your own copy somewhere safe if you’ll need it.

Import an environment file

Owners and admins can choose Import .env beside Add variable. In Import environment variables, click Choose file and select a .env or .txt file containing KEY=value lines. The selected filename stays visible; Replace file chooses another file, and the Remove file button clears it. Variables to import shows the count and a scrollable preview of names, with Values hidden. Connie previews the variable names, encrypts the values and saves the entire import together. It accepts up to 100 variables in a 200 KB file, with up to 8,192 characters per value. Quoted multiline values and export NAME=value are supported; shell expressions are treated as literal text. Existing variables are never overwritten by an import. A name already saved in the workspace is marked Already exists, so you can identify each conflicting variable. Import stays disabled until you remove or rename those entries in the file and choose the corrected file. A conflict that appears while importing is also reported by name when Connie can read the existing names. Use Edit on a saved variable if you want to replace its value. If the import fails, none of its variables are saved. Keep private credentials out of public-prefixed variables such as NEXT_PUBLIC_ and VITE_, which browser builds can expose.

Send local variables from Codex or a terminal

If your local checkout includes Connie’s scripts/connie-env.mts helper, run it from that checkout. It sends selected values directly to Connie using your existing personal API key, acting as a workspace owner or admin; values do not go through chat or model tool arguments. Otherwise, use the authenticated import API below from your own local script.
By default the command loads .env and then optional .env.local, with local values winning. Explicit --file options load only those files, in the order given; explicit files must exist. Later files override earlier ones, matching local dotenv loading. The preview and receipt show names only. Existing saved values are kept and listed as skipped; repeated imports never overwrite them. Use Settings to edit a saved value. --token-stdin accepts the personal key through standard input instead of CONNIE_API_KEY. For local development, --server http://localhost:<port> targets a local Connie API; the default is https://api.connie.ai. Your code can also call POST https://api.connie.ai/api/workspace-environment-variables/import with a bearer personal key and JSON { "workspaceId": "...", "variables": [{ "key": "TEST_API_KEY", "value": "..." }], "existing": "skip" }. Omit existing to refuse duplicates atomically. The response contains only workspaceId, imported names and skipped names. GET /api/workspace-environment-variables returns up to 100 names for that key’s workspace and a nextCursor (or null). Pass the returned name as URL-encoded after to read the next page. No values are returned. Both endpoints require an owner/admin execution member; OAuth MCP tokens and master keys are not accepted. Values are encrypted in the same storage used by Settings. A saved variable is not automatically injected into every agent run. Map only the variables a project needs in its setup card. Secret values must never be passed as MCP/ChatGPT tool arguments; use this local command or the encrypted Settings interface.

Set up a codebase from chat

Ask your agent to set up a repository and run its tests. Connie inspects the setup files without running repository commands, then shows Set up [project name] in chat. A reviewed setup that already matches the repository can be reused. The chat card uses the detected commands and matches saved variables automatically. Owners and admins see only missing secret values, with a private input for each. Choose Set up and continue to save the setup and continue the original task; secret values never become chat messages or AI tool arguments. Code can reach the internet and install packages by default. If an owner or admin has turned Internet access for code off and packages need it, the card includes Allow internet access for workspace code. Keep it checked to turn the workspace setting back on as part of setup, or uncheck it to keep the current network policy. Open Advanced to change commands, profile, folder, variable mappings or local services. Not needed removes an optional requirement. The full editor and a link to Settings → Environment are available there; routine setup does not require filling in those fields. Saved recipes appear under Settings → Environment → Project environments. Use Add project, Edit or Delete there. Deleting a recipe keeps the saved variables and repository files. The setup form includes the workspace’s Internet access for code control. It starts as Any website: code your agents run can connect to any website and install packages. An owner or admin can set it to Off; code then works on files and uses Connie tools for web requests and messages, and packages cannot be installed. Changing it affects code throughout the workspace. Advanced setup includes a start command, time limit, local services and Use local Temporal only. In Required variable names, separate names with commas, such as API_KEY, DB_URL. Each current name gets one mapping row. Creating a missing variable with Add variable → Create saves only that secret and returns you to the project draft. Choose Save environment separately when the project setup is ready. Test and Development profiles are supported; a production profile is not available. Recipes contain variable names and references. Only mapped values are provided to a run, separately from repository files. Code you run can read those values, so use trusted code and development or test credentials. Public-prefixed and reserved runtime variables cannot be mapped as secrets. Dependency installations are reused on the same computer when the install command, lockfiles and workspace manifests still match. A replacement computer uses preloaded runtimes, a public package cache and an exact dependency seed when one matches. A changed lockfile, dependency definition, npm configuration or runtime falls back to the normal install. Scripts and exports can change while reusing compatible preloaded dependencies; the current checkout’s install hooks still run. Repository edits survive failed tests. Successful setup and successful tests are reported separately. Setup and test scripts receive only the mapped variables; they cannot call Connie’s native tools or inherit connected accounts. Repositories can include a version 1 .connie/environment.json recipe for Connie to propose during detection. It contains commands, services and secret references, never secret values. A person still reviews a new setup before it is saved.

Complete a CLI sign-in in chat

Prefer an existing Connie account connection when one supports the task. If a CLI needs interactive sign-in, open a private DM with an agent you own. Choose Sign in to [provider] on its connection card. Connie copies a device code when one is supplied and opens the official provider page. Complete approval there; the original task continues automatically. If the CLI needs a returned code, the card then shows Sign-in code and Continue. Open Advanced only for terminal prompts, logs, navigation keys or Cancel sign-in. A CLI that asks you to press Enter to open its browser receives that Enter when you choose the sign-in button. Other terminal input remains private and requires your action. Only the account owner can view the terminal or submit input. Input and terminal output stay out of chat history and AI tool arguments. Login files live in that private computer, outside repository checkpoints, and are not a permanent Connie account connection. The sign-in expires after 15 minutes. If the computer is replaced, start a fresh sign-in; earlier input is not automatically replayed. When the CLI finishes successfully, the original task continues and the agent checks authentication with the CLI’s status command before claiming it is connected. Shared rooms cannot store personal CLI logins on their shared computer. A Development server card similarly lets its owner view server output privately.

Use a variable in a workflow step

1

Open the step's field

In your workflow, click into the field that needs the secret. For example, the Authorization header value of an Api Call step.
2

Insert the variable

Click + (or type @) to open Select variable or function. Under Environment Variables, pick your variable (shown with its description, or Secret if it has none). It’s inserted as a chip that shows the name, never the value.
3

Or type the reference

You can type it yourself: {{connie.env.STRIPE_API_KEY}}. Inside text, it works like any other variable, for example Bearer {{connie.env.STRIPE_API_KEY}}.
When the step runs, Connie fills in the real value just before sending the request. Saved step inputs keep the complete reference, such as {{connie.env.STRIPE_API_KEY}}, including for short or numeric secrets. Secret values echoed in results or error messages are replaced with their references before saving, including when you use Test. Size limits never cut a secret reference in half. See Variables.

Edit or delete a variable

Owners and admins only. Members can view the saved variable names and descriptions, but Add variable is disabled and edit/delete actions are hidden. The page explains “Only workspace owners and admins can add, edit, or delete variables.” Controls stay disabled while Connie checks your role, and the permission notice appears only after that check finishes.
  • Edit: click ⋯ on the row → Edit. The dialog says “The current value can’t be shown — entering a new one overwrites it.” Type a New value (or leave it blank to keep the current value), change the Description if you like, and click Save.
  • Delete: click ⋯ → Delete. The confirmation warns: “Any workflow referencing {{connie.env.KEY}} will stop resolving it.” Click Delete.

Good to know

  • Inline secret references work in workflow steps. Chat, Agents and MCP tool arguments do not expand them. Project environments separately map selected saved variables into code runs; use their setup form rather than pasting values into chat.
  • A step only fills in the secrets its own fields reference. A {{connie.env...}} reference that arrives in data while the workflow runs, such as in a scraped page or an email, isn’t filled in. A webhook request whose payload holds one is refused with 400 (see Webhooks).
  • A redirect to another address doesn’t get your key. If the service answers an Api Call with a redirect to a different domain, port or protocol (for example https to http), Connie follows it without the Authorization and Cookie headers or any header whose name looks like a key, token or secret (such as X-API-Key). A redirect that would send the request’s body there (a 307 or 308 answer to a request with a body) isn’t followed at all, and the step stops. If the service needs your key or body at the new address, put that final URL in the step. The step’s Test button follows redirects the same way.
  • Who can do what: every workspace member can see the list of names. Only owners and admins can add, edit or delete. Members see a disabled Add variable button; edit/delete actions are hidden.
  • Names are unique in a workspace, and they’re case-sensitive in references. Use the name exactly as saved.
  • Never paste a real key into a step or a chat. Save it here and use the reference.

Troubleshooting

Why: the step references a variable name that isn’t saved, or is spelled differently. The workflow step fails. Fix: go to Settings → Environment (the message calls it ‘Env’) and add a variable with exactly that name, or fix the reference in the step.
Why: a {{connie.env...}} reference was used directly in Chat, an Agent or an MCP call, where inline secrets aren’t filled in. Fix: use the reference in a workflow step. For a codebase, map the saved variable through its Project environments setup instead of putting its value in a message or tool argument.
Why: the service answered with a 307 or 308 redirect to a different domain, port or protocol, and following it would send your request’s body (which may hold your key) there. The message names the new address. On the Test button, the message starts at “Refusing to follow”. Fix: put that address in the step’s URL.
Fix: remove spaces, dashes and other symbols. For example, use MY_API_KEY, not my-api key.
Fix: pick another name, or use Edit on the existing variable to change its value.
Fix: both Name and Value are required.
Why: only owners and admins can change environment variables. Fix: ask an admin. See Members and roles.
Why: values are never shown after saving. Fix: get the value from the service it came from, then use Edit to save it again if needed.