The Adaptavist Group LogoDocumentation

Automate with Forms for Confluence

Explore Automate with Forms for Confluence in Forms for Confluence Data Center.

Collecting responses is only the first step. Forms for Confluence also allows you to automate what happens next, so your team can act on submissions immediately. Depending on how you configure your form, responses can be:

Warning: Automation requires Confluence Admin permissions, since it affects where data is routed and how it's used.

Send Responses to an Email Address

You can configure a form to send each submission to one or more email addresses. This is useful if you want a team inbox to monitor requests without needing Confluence access. This can be done inside the Forms macro or from the Administration page.

Add Emails in the Forms Macro

  1. Navigate to the form and click Edit.
  2. Add the email address(es)/ confluence user name(s) to the Destination field.
  3. Click Save.

Now, whenever the form is submitted, a copy of the response will be sent to the chosen inbox.

Add Emails from Confluence Administration Page

  1. In Confluence Administration, navigate to Forms for Confluence.
  2. Find or create the Form ID you want to configure.
  3. Set the Destination type to Email Relay and enter the email address(es).
    Warning: When using email relay you can only enter email addresses, you can't use Confluence user names.
  4. Click Save.

Now, whenever the form is submitted, a copy of the response will be sent to the chosen inbox.

Create Jira Issues from Form Submissions

If your team tracks work in Jira, you can use form submissions to automatically create issues. This requires ScriptRunner for Jira to be installed and linked to your Confluence instance. When users fill in the form, their responses will be mapped to Jira fields, creating a new issue. This is often used for bug reports, service requests, or feature feedback.

  1. In Confluence Administration, create a Form ID with the destination type set to Jira (ScriptRunner).
  2. Select the Jira application link from the dropdown.
  3. Enter the ScriptRunner endpoint that will process the form data.
  4. Click Save.

Create Confluence Pages from Form Submissions

Forms can also generate new Confluence pages when submitted, which is useful for capturing structured requests or proposals. This requires ScriptRunner for Confluence.

  1. In Confluence Administration, create a Form ID with destination type set to ScriptRunner.
  2. Create your form using input fields to collect:
    1. Space Key
    2. Page title
    3. Page content
    4. (optional) Additional fields you choose to define in your script.
  3. In ScriptRunner, configure the Event Listener using the FormSubmitEvent.

    See the ScriptRunner Documentation for more information on scripting.

    Warning: When creating your script make sure that the values for the following fields match the name defined for the corresponding macros in the form.
    • spaceKey
    • pageTitle
    • pageContent

    Example Script

    import com.atlassian.confluence.core.DefaultSaveContext
    import com.atlassian.confluence.pages.Page
    import com.atlassian.confluence.pages.PageManager
    import com.atlassian.confluence.spaces.SpaceManager
    import com.atlassian.sal.api.component.ComponentLocator
    import com.atlassian.xwork.FileUploadUtils
    import groovy.json.JsonSlurper
     
    try {
        String event = ((HashMap<String, String>) binding.variables).get("event").structuredValue
        Map<String, String> data = new JsonSlurper().parseText(event)
     
        List<FileUploadUtils.UploadedFile> uploadedFiles = ((HashMap<String, String>) binding.variables).get("event").uploadedFiles
     
        def pageManager = ComponentLocator.getComponent(PageManager)
        def spaceManager = ComponentLocator.getComponent(SpaceManager)
     
        def spaceKey = data.get("spaceKey")[0]
        def pageTitle = data.get("pageTitle")[0]
        def pageContent = data.get("pageContent")[0]
     
        def targetPage = new Page(
            space: spaceManager.getSpace(spaceKey),
            title: pageTitle,
            bodyAsString: pageContent,
        )
     
        pageManager.saveContentEntity(targetPage, DefaultSaveContext.DEFAULT)
     
    } catch (anyException) {
        log.warn("Failed to create page for new user", anyException)
    }
  4. Click Add.

When the form is submitted, a new Confluence page is automatically created using the values from the script.

Search documentation

Start typing to search the docs.