The Adaptavist Group LogoDocumentation

Script Variables

Script Variables allow you to specify variables that can be injected into your scripts.

Use Script Variables to create variables that can be inserted into your scripts. Script Variables are encrypted and stored in your Confluence Cloud instance. You can use them to share common variables between your scripts or to store sensitive data, like passwords, that require encryption rather than hardcoding them in scripts directly.
Note: Please remember that a variable has a String value type, even if the value is a number. It is also worth noting that Script Variables are static and can only be set on the Script Variables page, so you cannot dynamically set the values of these via a script.

Naming convention

Variable names must follow these rules:

  • The name must start with a letter
  • Only capital letters are allowed
  • Only digits and the underscore character (_) are allowed.

Limitations

Length limits for variables include:

  • Name is 32 characters max

  • Value is 3000 characters max.

Note that clicking the show password icon for script variables containing 50 or more characters opens a pop-up window for easy viewing.

Create Script Variables

Follow these steps to create a script variable:
  1. Navigate to ScriptRunner and select Script Variables. The ScriptRunner More menu option is expanded, and the Script Variables option is highlighted.
    1. If you've never created a Script Variable before, the bottom of the page will be titled Create Script Variable, and the fields to do so will be available.
    2. If you've created Script Variables before, they'll be listed on the page. Click + Create Script Variable to make a new one.
  2. Enter a Script Variable name.
  3. Enter the Script Variable value.
  4. Select Save.
A confirmation message displays. The newly created variable appears in the list of Script Variables on the page.

Search documentation

Start typing to search the docs.