Use credentials

Add, test, and use credentials. Connect OAuth2 accounts.

A credential holds a secret for a node, for example an API key. For all credential types and detail, see Credentials.

Zerodot encrypts credentials with AES-256-GCM. The key is ZERODOT_SECRET_KEY. Zerodot never shows a saved value again.

Add a credential

  1. Open Credentials in the sidebar.
  2. Click New credential.
  3. Pick the type with Search for app....
  4. Enter a Credential name and the fields.
  5. Click Save.

You can also add a credential from a node. Pick a credential in the node, or use Pick a saved credential.

Test a credential

Zerodot tests a credential when you save it. A credential that fails the test is not saved. The form shows the error. To test again, click Test again. An OAuth2 credential cannot be tested before you connect it.

To change a credential, leave a secret field empty. Zerodot keeps the saved value.

Connect an OAuth2 account

  1. At the service, make an OAuth app.
  2. Set its redirect URL to <BASE_URL>/oauth2/callback. <BASE_URL> is the value of ZERODOT_BASE_URL. The form shows the Redirect URL.
  3. In zerodot, make an OAuth2 credential. Enter the client id, client secret, authorize URL, token URL, and scopes.
  4. Click Save and connect.
  5. Allow access at the service.

Zerodot uses PKCE. It refreshes the access token before a run when the token is near its end. The authorize and token URLs must use HTTPS. HTTP is allowed for localhost.

Reconnect needed

If the service refuses the refresh token, the credential shows Reconnect needed. Runs that use it fail. To fix it, open the credential and click Save and reconnect.

Use a credential in a node

Pick the credential in the node. The node sends it with the request.

To put a field of a credential in a node setting, use an expression:

https://api.telegram.org/bot{{ $credentials["Telegram bot"].token }}/sendDice

Rules:

  • Write the credential name and the field as text. A name from an expression is not allowed.
  • The credential must be in the same project.
  • Only the config of a node can read it. The Code node cannot.
  • The editor shows •••••• in the preview. The browser never gets the real value.
  • Zerodot removes the value from node output, logs, and errors. It does not remove other forms, for example Base64. It does not remove a value shorter than 4 characters.
  • Anyone who can edit a workflow can send a credential of the project to any URL. Give edit access only to people you trust.

For more detail, see Workflow editor and Editor reference.

Rotate the secret key

  1. Make a new key: openssl rand -base64 32.
  2. Run this command:
ZERODOT_SECRET_KEY=<old key> ZERODOT_NEW_SECRET_KEY=<new key> DATABASE_URL=<url> pnpm run rotate-key
  1. Set ZERODOT_SECRET_KEY to the new key in every service.
  2. Restart the services.

The command also seals the AI provider keys again. Keep a copy of the key. With a lost key, zerodot cannot open saved credentials.

Change this page on GitHub