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
- Navigate to ScriptRunner and select Script Variables.

- 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.
- If you've created Script Variables before, they'll be listed on the page. Click + Create Script Variable to make a new one.
- Enter a Script Variable name.
- Enter the Script Variable value.
- Select Save.