A Secret is a resource within a project. It can be used to securely store sensitive data that you want to use in a Custom Module.


You can create a Secret within a project by clicking the button in the resource list with the plus sign (see Figure 2).


Figure 2: Button for creating a Secret


The configuration page of a Secret consists of two sections:

  • General Settings
  • Secret Items

In the General Settings page, you can edit the name of your Secret, and in the Secret Items section, you can add new Secret Items to your Secret. A Secret Item is a key-value pair that you can access in your Custom Modules. The values are encrypted and cannot be inspected in the UI.


Size limit

The entire Secret has a maximum size of 10 MB. This means that you can create as many Secret Items as you want, but as soon as the entire Secret exceeds 10 MB, you cannot add new Secret Items


Access Rights

You need to have the developer role or one of the secrets_basic, secrets_editor or secrets_admin roles in order to use Secrets

Using Secrets in a Custom Module

In order to use a Secret in a Custom Module, you need to add a special argument to your Custom Module. The argument needs to be of type SecretSelect, which will display a DropDown in your Node in the UI, so that you can select one of your created Secrets. The name of the argument needs to be secret.

 * Some description.
 * @arg {SecretSelect} `secret` The secret you want to use.

You can then access the Secret in your Custom Module like this:

 * Outputs a secret
 * @arg {SecretSelect} `secret` The secret you want to use.
async function outputSecret(input, args) {
        const { secret } = args;

            // Outputs: { "secretItemKey": "secretItemValue" }
        input.actions.output(JSON.stringify(secret, undefined, 4));

        return input;

module.exports.tellJoke = outputSecret;


Secret limit

You can only use one Secret per Custom Node