The Adaptavist Group LogoDocumentation

Scripting Resources

Learn about the resources available to make your Confluence Cloud experience better.

To use ScriptRunner for Confluence Cloud to its full capability, write scripts in Groovy to automate and extend your Confluence Cloud instance. Using scripts, you can enhance your Confluence Cloud content and administer your Confluence Cloud instance easily.

  • Enhance your Confluence Cloud spaces, pages, and users
  • Administer your Confluence Cloud instance easily

ScriptRunner makes things easier and allows experienced users to perform advanced tasks. You can do anything in a script that you could do in a plugin, usually without the overhead of understanding the host of software development tools and methodologies that a typical plugin developer would have to worry about.

But scripting can be challenging. This page provides information on writing, maintaining, storing, and integrating scripts.

Write scripts

Learn about writing scripts to suit your needs in the Code Editor.

Every place you write code in ScriptRunner for Confluence Cloud uses the Code Editor. The browser-based Code Editor provides code completions, inline Javadoc lookups, and error line indications.

To practice scripting with the Code Editor, you can use the Script Console to run one-off ad hoc scripts and to learn and experiment with the Confluence API.

Scripting languages

In ScriptRunner for Confluence Cloud, we use the Apache Groovy language to write scripts. Apache Groovy is a dynamic language for the Java platform with a familiar syntax, and it allows for domain-specific language authoring. To learn more about Apache Groovy, visit these resources:

  • Introduction to Groovy is an Adaptavist ScriptRunner for Confluence Cloud documentation page that links you with specific ScriptRunner coding question resources.
  • The Apache Groovy website has in-depth documentation, blog posts, and support to help you learn and troubleshoot Groovy.

Script variables

Script variables allow you can specify variables that can be injected 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.
Tip: Remember that variable value has a type String, even if the value is a number.

Variable names must follow these rules:

  • Start with a letter

  • Only capital letters are allowed

  • Only letters, digits, and the underscore character (_) are allowed

Length limit for variable:

  • Name is 32 characters

  • Value is 128 characters

Search documentation

Start typing to search the docs.