> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rootly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

> Automate Confluence page creation, updates, and labelling for incident retrospectives using Rootly workflow actions with parent page and template support.

## Overview

Workflows let you automate Confluence page creation and control exactly what information Rootly publishes during an incident. You can trigger a page creation when an incident resolves, when a retrospective begins, or on any other workflow event — and use Liquid variables to populate pages with live incident data.

<Frame>
  <iframe src="https://www.loom.com/embed/ff6013ecd3c94469a1f3a29813bcc391?sid=b205beab-6849-4f31-b8d8-3b2b0237122d" frameborder="0" allowfullscreen width="100%" height="400px" />
</Frame>

<Callout icon="circle-info" color="#DBEAFE">
  If you do not need advanced trigger or condition logic, skip to [Step 3](#step-3-add-the-create-confluence-page-action) to add the action directly.
</Callout>

## Step 1: Create a Workflow

<Steps>
  <Step title="Open workflow creation">
    Navigate to **Workflows** in the Rootly sidebar and click **Create Workflow**.

    <Frame>
      <img alt="Rootly workflows page" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-1.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=5a6c0a10ae83a7f1be937518e039272d" width="892" height="323" data-path="images/integrations/confluence/workflows/image-1.png" />
    </Frame>

    <Frame>
      <img alt="Create workflow button" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-2.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=36c033ae1b0b82cc73b5d336b926c8ab" width="1165" height="578" data-path="images/integrations/confluence/workflows/image-2.png" />
    </Frame>
  </Step>

  <Step title="Choose a workflow type">
    Select the workflow type that matches your use case:

    * **Incident** — trigger actions during active incidents
    * **Retrospective** — trigger actions when a retrospective begins or changes status
    * **Pulse** — trigger actions on a schedule

    <Frame>
      <img alt="Workflow type selection" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-3.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=8d730443f6514d3c589f861059ce6767" width="1365" height="630" data-path="images/integrations/confluence/workflows/image-3.png" />
    </Frame>
  </Step>
</Steps>

## Step 2: Configure Triggers

Triggers define when the workflow runs.

<Frame>
  <img alt="Workflow trigger configuration" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-triggers.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=eb849b2ad17a48171a1de7356dcb0417" width="621" height="305" data-path="images/integrations/confluence/workflows/image-triggers.png" />
</Frame>

| Trigger                          | When it fires                                               |
| -------------------------------- | ----------------------------------------------------------- |
| **Incident Created**             | A new incident is opened                                    |
| **Incident Updated**             | A field like severity or status changes                     |
| **Incident Status Changed**      | The incident moves into a specific status                   |
| **Retrospective Status Changed** | The retrospective status changes (e.g., Started, Published) |
| **Manual Trigger**               | An operator runs the workflow manually from the UI          |

<Callout icon="circle-info" color="#DBEAFE">
  For retrospective pages, use **Retrospective Status Changed** with a condition of **Status equals Started** so pages are created when a retrospective kicks off.
</Callout>

## Step 3: Add Conditions

Conditions let you refine when the workflow executes after a trigger fires.

<Frame>
  <img alt="Workflow conditions panel" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-condition.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=896e81fbe353f3f278bea33aca508b93" width="626" height="334" data-path="images/integrations/confluence/workflows/image-condition.png" />
</Frame>

Common condition patterns:

* **Severity filter** — only create a page for SEV-1 or SEV-2 incidents
* **Team or service filter** — scope page creation to incidents affecting specific teams or services
* **Incident type** — ensure the workflow only runs when Kind is set to **Incident**
* **Environment** — only generate pages for production or customer-impacting issues

## Step 4: Add the Create Confluence Page Action

<Steps>
  <Step title="Add an action">
    Click **Add Action** and search for **Confluence**.

    <Frame>
      <img alt="Add action dialog with Confluence search" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-4.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=4ec6ded1fc271f772b316cf0db7e39e3" width="677" height="221" data-path="images/integrations/confluence/workflows/image-4.png" />
    </Frame>
  </Step>

  <Step title="Select Create Confluence Page">
    Choose **Create Confluence Page** from the results.

    <Frame>
      <img alt="Create Confluence Page action selected" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-5.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=6bb8fb08cf234f97fda7d373c7ce50c5" width="504" height="348" data-path="images/integrations/confluence/workflows/image-5.png" />
    </Frame>

    <Frame>
      <img alt="Confluence action configuration panel" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-6.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=e954d49aaad3a9a2e8b03b5d2b39b718" width="444" height="510" data-path="images/integrations/confluence/workflows/image-6.png" />
    </Frame>
  </Step>

  <Step title="Configure the action">
    Fill in the fields using the table below.
  </Step>

  <Step title="Save the workflow">
    Click **Add**, enter a workflow name, and click **Create Workflow**.
  </Step>
</Steps>

### Action Fields

| Field                               | Required | Description                                                                                                            |
| ----------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Space Key**                       | Yes      | The Confluence space where the page will be created. Find this under **Space Settings → Space Details** in Confluence. |
| **Title**                           | Yes      | The page title. Supports Liquid syntax (e.g., `{{ incident.title }}`).                                                 |
| **Ancestor**                        | No       | Page ID of a parent page. If blank, the page is created at the root of the space.                                      |
| **Confluence Template**             | No       | A template fetched from your Confluence space. Overrides both retrospective template fields.                           |
| **Custom Retrospective Template**   | No       | Define page content directly using Liquid variables. Overrides the Retrospective Template field.                       |
| **Retrospective Template**          | No       | A pre-built template from [Retrospective Templates](https://rootly.com/account/retrospective-steps?tab=documents).     |
| **Mark Retrospective as Published** | No       | Publish the page immediately rather than leaving it as a draft.                                                        |

<Callout icon="triangle-exclamation" color="#FEF3C7">
  If a **Confluence Template** is selected, it overrides both the **Custom Retrospective Template** and **Retrospective Template** fields.
</Callout>

## Update an Existing Confluence Page

In addition to creating pages, Rootly can update pages that already exist. Add an **Update Confluence Page** action and configure the following fields:

| Field                   | Required | Description                                                                                                  |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| **Page ID**             | Yes      | The ID of the Confluence page to update. Supports Liquid syntax to reference a page created in a prior step. |
| **Title**               | No       | Updated page title. Leave blank to keep the existing title.                                                  |
| **Content**             | No       | Updated page content using Liquid variables.                                                                 |
| **Confluence Template** | No       | Re-apply a Confluence template when updating the page.                                                       |

## Creating a Confluence Template

Rootly fetches page templates directly from your Confluence space via the API. Templates you create in Confluence appear automatically in the **Confluence Template** dropdown within the workflow action.

<Steps>
  <Step title="Open your Confluence space">
    Navigate to the space where you want to create the template and open **Space Settings**.

    <Frame>
      <img alt="Confluence space selection" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-7.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=224176253b4c896f57f4b492c6ea4c3e" width="520" height="317" data-path="images/integrations/confluence/workflows/image-7.png" />
    </Frame>
  </Step>

  <Step title="Access template settings">
    Under **Look and Feel**, select **Templates**.

    <Frame>
      <img alt="Confluence space settings showing Templates option" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-8.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=8fd8ffe012f6c6a96bd3ce7db189044f" width="303" height="398" data-path="images/integrations/confluence/workflows/image-8.png" />
    </Frame>
  </Step>

  <Step title="Create the template">
    Click **Create New Template** and add your content. Liquid syntax is fully supported.

    <Frame>
      <img alt="Create new template button" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-9.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=0ba538edb1cfa5a9a3617eb483f5837a" width="1030" height="325" data-path="images/integrations/confluence/workflows/image-9.png" />
    </Frame>

    <Frame>
      <img alt="Template editor with Liquid variables" src="https://mintcdn.com/rootly/tW7XU81cMVMyDJRG/images/integrations/confluence/workflows/image-10.png?fit=max&auto=format&n=tW7XU81cMVMyDJRG&q=85&s=5556f9ea8c24b21ced573e895c689364" width="1365" height="631" data-path="images/integrations/confluence/workflows/image-10.png" />
    </Frame>
  </Step>

  <Step title="Save the template">
    Click **Save**. The template will appear in the **Confluence Template** dropdown the next time you configure a Create Confluence Page action.
  </Step>
</Steps>

## Template Examples

Use the [Liquid Variable Explorer](https://rootly.com/account/help/liquid-explorer) to test variables before deploying templates in production.

<Tabs>
  <Tab title="Standard Retrospective">
    ```markdown theme={null}
    # Retrospective: {{ incident.title }}

    **Date:** {{ incident.started_at | date: "%Y-%m-%d" }}
    **Severity:** {{ incident.severity }}
    **Status:** {{ incident.status }}

    ## Summary
    {{ incident.summary }}

    ## Timeline
    {{ incident.timeline_table_markdown }}

    ## Services Affected
    {% for service in incident.services %}
    - {{ service }}
    {% endfor %}

    ## Teams Involved
    {% for group in incident.groups %}
    - {{ group.name }}
    {% endfor %}

    ## Follow-Up Items
    {% for action_item in incident.action_items %}
    - {{ action_item.summary }} ({{ action_item.status }})
    {% endfor %}

    ## Lessons Learned
    [To be completed by the team]
    ```
  </Tab>

  <Tab title="Executive Summary">
    ```markdown theme={null}
    # Executive Summary: {{ incident.title }}

    **Date:** {{ incident.started_at | date: "%B %d, %Y" }}
    **Severity:** {{ incident.severity }}
    **Duration:** {{ incident.duration }} minutes

    ## What Happened
    {{ incident.summary }}

    ## Resolution
    {{ incident.resolution_message }}

    ## Key Metrics
    - Services Affected: {{ incident.services | size }}
    - Time to Resolution: {{ incident.duration }} minutes

    ## Next Steps
    {% for action_item in incident.action_items %}
    - {{ action_item.summary }}
    {% endfor %}
    ```
  </Tab>

  <Tab title="Technical RCA">
    ```markdown theme={null}
    # Root Cause Analysis: {{ incident.title }}

    **Started:** {{ incident.started_at | date: "%Y-%m-%d %H:%M %Z" }}
    **Resolved:** {{ incident.resolved_at | date: "%Y-%m-%d %H:%M %Z" }}
    **Duration:** {{ incident.duration }} minutes

    ## Affected Services
    {% for service in incident.services %}
    - {{ service }}
    {% endfor %}

    ## Detailed Timeline
    {{ incident.timeline_table_markdown }}

    ## Root Cause
    [To be completed by engineering team]

    ## Resolution Steps
    {{ incident.resolution_message }}

    ## Preventive Measures
    {% for action_item in incident.action_items %}
    - {{ action_item.summary }} ({{ action_item.status }})
    {% endfor %}
    ```
  </Tab>
</Tabs>

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="My Confluence template is not appearing in the dropdown" icon="file-lines">
    Rootly fetches templates from your Confluence space via the API. Ensure the template was saved in the correct space and that your Rootly integration has access to that space. Try disconnecting and reconnecting the integration to refresh the template list.
  </Accordion>

  <Accordion title="The workflow ran but no Confluence page was created" icon="bell">
    Check the workflow run log in Rootly for error details. Common causes include an invalid Space Key, a missing or incorrect Ancestor page ID, or a Liquid variable that returned an empty value for the Title field (Title is required). Verify the Space Key matches exactly what appears in **Space Settings → Space Details** in Confluence.
  </Accordion>

  <Accordion title="Liquid variables are rendering as blank on the page" icon="circle-xmark">
    Use the [Liquid Variable Explorer](https://rootly.com/account/help/liquid-explorer) to verify that the variable returns a value for your incident. Some variables like `incident.resolved_at` will be empty if the incident has not yet resolved. Add a fallback using Liquid filters (e.g., `{{ incident.resolved_at | default: "TBD" }}`).
  </Accordion>

  <Accordion title="Can I create a page in multiple spaces from one workflow?" icon="plus">
    Add multiple **Create Confluence Page** actions to the same workflow, each configured with a different Space Key. Each action runs sequentially and creates an independent page.
  </Accordion>

  <Accordion title="How do I reference a page created earlier in the same workflow?" icon="bolt">
    Use the **Update Confluence Page** action after a **Create Confluence Page** action. Reference the created page ID via Liquid using the output of the prior step.
  </Accordion>
</AccordionGroup>
