---
title: "Appfire Power Scripts for Confluence app"
canonical: "https://support.appfire.com/space/CDML/1773503523/Appfire%20Power%20Scripts%20for%20Confluence%20app"
format: markdown
---
> Macro (aura-html)


> Macro (toc)

## Overview

![Powerscripts for Confluence app icon](media://13feb737-6845-4005-ab92-87a8c7d1eb96)

---

This page provides information on integrating [Appfire Power Scripts for Confluence app](https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.reporting/server/overview) with Comala Document Management. Appfire Power Scripts for Confluence offers scripting capabilities to extend Confluence functionality. The app includes a number of scripting routines related to Comala Document Management workflows.

## Benefits

You can integrate the **Power Scripts for Confluence app** with Comala Document Management to manage files and documents and keep Confluence spaces well organized.

The integration lets you listen for workflow events and automatically manage changes and events for your documents in your hosted Confluence instance, such as

- archive, or move pages
- send email escalation for expired workflow states

## Listener events for Comala Document Management workflows

Power Scripts lets a global administrator add a **Listener** for selected workflow events and undertake one or more actions. Actions are created and stored as simple instructions (**SIL**) using the Power Scripts app.

![cdmdc_powerscripts_addlistener_approve_event_approvedscript.png](media://a162354f-4725-4629-86ad-82e59cecec4d)

Multiple listeners can be added to your instance.

![cdmdc_powerscripts_listeners_administration.png](media://98413059-02ef-4be9-ad50-a8f2ee84d895)

 Each added **Listener** can be set as **Enabled** or **Disabled**. You can also filter the displayed **Listeners** by event:

![cdmdc_powerscripts_filterevents_dropdown_comala.png](media://e6f0a90c-8d8e-4541-b0e9-f5c199022647)

Power Scripts includes a range of **Listener** events for workflows.

Listeners include workflow events for

- approval decisions (approved and rejected)
- reviewer assignment (assigned and unassigned)
- workflow task updated
- workflow parameter changes
- workflow configuration changes

## Scripting actions

Script actions are created in the app using the **SIL Manager** and stored in a repository in your Confluence instance.

![cdmdc_powerscripts_silmanager_addedscript_movepage.png](media://ee0f49b4-4e23-4934-9d26-8185152a0960)

For example, the above SIL uses the app **getPage** routine to set a parent page. The script action then moves a page to be a child of the **Rejected** page in the space **PP**. 

Scripts can be selected by using the **Choose this script** in the **Add New Listener** dialog box to from the select a script from the SIL program repository

![cdmc_powerscripts_selectfile_script_sil_ for listener.png](media://1539ed4c-6aef-4dcc-9742-da7d98851622)

 For example, you can add a new listener for a **Comala Content Reject** event and choose the script to move a page on a reviewer’s **reject** decision for an approval in the applied workflow.

![cdmdc_powerscripts_addlistener_reject_event_rejectedscript.png](media://42ea0356-895f-4a23-ae04-be713cfa08af)

Power Scripts for Confluence includes the following scripting routines related to a Comala workflow:

- [set the workflow state for a page](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15306624)
- [retrieve the workflow state for a page](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15307202)
- [retrieve the workflow added to a specific page](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15304984)
- [retrieve the workflows in a selected space](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15305003)
- [enable a workflow](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303850) or [disable a workflow](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303845) in a Confluence space
- [add workflows to a space](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15305008) or [remove a specific workflow from a space](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15304075)
- [add a workflow to a page](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15304961) or [remove a workflow from a page](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15304038)

The available Power Scripts for Confluence routines for Comala Document Management Data Center are listed on [this page](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303926).

### Power Script SIL examples

- [Move a page](https://appfire.atlassian.net/wiki/spaces/CTR/pages/16973917) - move a page based on an approval decision - rejected or approved
- [Archive a page](https://appfire.atlassian.net/wiki/spaces/CTR/pages/16974050) - archive a page when it transitions to a specified state in the applied workflow
- [Send email escalation for expired states](https://appfire.atlassian.net/wiki/spaces/CTR/pages/16973998) - send an email with a list of pages that have an expired state

## Appfire Power Scripts

- [Power Scripts for Confluence app product documentation](https://appfire.atlassian.net/wiki/spaces/REPS)
- [Power Scripts for Confluence Comala Workflow routines for scripting](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303926)
- [Atlassian Marketplace - Power Scripts for Confluence Data Center](https://marketplace.atlassian.com/apps/1219507/power-scripts-for-confluence?hosting=datacenter&tab=overview)