Keep API keys and passwords in app secrets

Store API keys, tokens and passwords encrypted in App Secrets, and read them in a workflow's Run Custom Code action without showing them in your app.

  • Verified Nov 17, 2026
  • Classic builder

On this page
  1. App secrets or app variables?
  2. Add a secret
  3. Use a secret in a workflow
  4. Change, turn off or delete a secret
  5. Plans

App secrets hold values you must not show anyone, such as an API key, an access token or a password for another service. Tadabase encrypts a secret's value when you save it and never shows it again, not even to you.

App secrets or app variables? #

App variablesApp secrets
StoredAs plain textEncrypted
Shown in the builderYes, the full valueOnly the last four characters
Used inPages, form emails, workflowsThe Run Custom Code workflow action
Good forContact details, links, totalsAPI keys, tokens, passwords

See Store reusable values in app variables for values that are safe to show.

Add a secret #

  1. Open App Secrets In the builder, click Settings in the left menu, then App Secrets, then Add New Secret.
  2. Name it Enter a Name, for example STRIPE_KEY. Your code reads the secret by this exact name, so keep it short and do not reuse it. Add a Description so other builders know what it is for.
  3. Enter the value Paste the key or password into Secret Value. The field hides what you type.
  4. Save Click Save. The list now shows the secret's Name, Description, Masked Value (dots and the last four characters) and Status.
The new secret form with Name, Description and a hidden Secret Value field

Use a secret in a workflow #

Secrets are read in a workflow's Run Custom Code action. In the code, call getAppSecret("NAME") with the secret's name:

javascript
var apiKey = getAppSecret("STRIPE_KEY");
  • Only the secrets your code names are decrypted for that run.
  • If the code returns or prints a secret's value, it is masked in the action's output.
  • A secret that is Inactive, or a name that does not exist, gives no value (undefined).

For more on the action, see Running Custom Javascript.

Change, turn off or delete a secret #

  • Replace the value (for example after you rotate a key): click the secret, paste the new value into Secret Value and click Save. Leave the field blank to keep the stored value.
  • Turn it off: set the switch at the top right to Inactive and save. Workflows stop receiving its value.
  • Delete it: click the secret, then Delete, and confirm.

Plans #

App secrets are a plan feature. If your plan does not include them, App Secrets does not appear in the settings menu.

Was this page helpful?

Something wrong or missing on this page? Tell us.