> ## 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 Notion page creation and updates for incident retrospectives using Rootly workflows with parent page, database, and Liquid template controls.

## Overview

Workflows let you automate Notion page creation and updates for incident retrospectives. You can trigger page creation when an incident resolves or a retrospective begins, and populate the page with timeline data, action items, and custom template content using Liquid variables.

## Available Actions

| Action                 | Description                                                        |
| ---------------------- | ------------------------------------------------------------------ |
| **Create Notion Page** | Creates a new retrospective page in a specified Notion parent page |
| **Update Notion Page** | Overwrites an existing Notion page with the latest incident data   |

## Create a Workflow

<Steps>
  <Step title="Open Workflow Creation">
    Navigate to **Workflows** in Rootly and click **Create Workflow**.

    <Frame>
      <img alt="Rootly workflows page" src="https://mintcdn.com/rootly/iGk9QgMwzZ9PnoIQ/images/integrations/notion/workflows/image-1.png?fit=max&auto=format&n=iGk9QgMwzZ9PnoIQ&q=85&s=0af4bceb98a1c56a5caf16ca11585d6b" width="895" height="322" data-path="images/integrations/notion/workflows/image-1.png" />
    </Frame>

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

  <Step title="Choose Workflow Type">
    Select the workflow type that matches your use case — **Incident**, **Retrospective**, or **Pulse**.

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

  <Step title="Configure Triggers">
    Triggers define when the workflow runs. Choose the event that should kick off page creation.

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

    | Trigger                     | When it fires                            |
    | --------------------------- | ---------------------------------------- |
    | **Incident Created**        | A new incident opens                     |
    | **Incident Updated**        | Severity, status, or other fields change |
    | **Incident Status Changed** | The incident moves to a specific status  |
    | **Incident Resolved**       | The incident is resolved                 |
    | **Retrospective Started**   | The retrospective process begins         |
    | **Manual Trigger**          | Run on demand from the UI                |
  </Step>

  <Step title="Add Conditions (Optional)">
    Use conditions to control when the workflow fires after the trigger. For example, only create a Notion page for SEV-1 or SEV-2 incidents, or only for specific teams or environments.

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

  <Step title="Add the Notion Action">
    Click **Add Action** and search for **Notion**.

    <Frame>
      <img alt="Add action with Notion search" src="https://mintcdn.com/rootly/iGk9QgMwzZ9PnoIQ/images/integrations/notion/workflows/image-4.png?fit=max&auto=format&n=iGk9QgMwzZ9PnoIQ&q=85&s=06b16fddaf92a56f68e0b443a4e84a18" width="677" height="221" data-path="images/integrations/notion/workflows/image-4.png" />
    </Frame>
  </Step>
</Steps>

## Create Notion Page

Use this action to create a new retrospective page in Notion for an incident. The page is created under a parent page you select and is populated using the template and fields you configure.

<Frame>
  <img alt="Create Notion Page action" src="https://mintcdn.com/rootly/iGk9QgMwzZ9PnoIQ/images/integrations/notion/workflows/image-5.png?fit=max&auto=format&n=iGk9QgMwzZ9PnoIQ&q=85&s=8003862ab308202491a65b04338d0d0a" width="698" height="382" data-path="images/integrations/notion/workflows/image-5.png" />
</Frame>

<Frame>
  <img alt="Notion page action configuration" src="https://mintcdn.com/rootly/iGk9QgMwzZ9PnoIQ/images/integrations/notion/workflows/image-6.png?fit=max&auto=format&n=iGk9QgMwzZ9PnoIQ&q=85&s=a713586e03438e52097a53509cc75c7c" width="594" height="584" data-path="images/integrations/notion/workflows/image-6.png" />
</Frame>

| Field                             | Description                                                                                                                                                        |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Page**                          | The parent Notion page where the new page will be created. Must be a page Rootly was granted access to during installation.                                        |
| **Title**                         | The page title. Supports Liquid syntax — use the incident title or any other variable.                                                                             |
| **Post Mortem Template**          | A pre-built retrospective template from [Retrospective Templates](https://rootly.com/account/retrospective-steps?tab=documents).                                   |
| **Mark Post Mortem as Published** | Set the retrospective status to `published` immediately rather than leaving it as `draft`.                                                                         |
| **Show Timeline as Table**        | Include the incident timeline. Uncheck if you want images to appear inline — Notion does not support images in tables.                                             |
| **Show Action Items as Table**    | Include follow-up action items. Only `follow-up` type items are included — tasks are excluded as they are completed during the incident, before the retrospective. |
| **Skip on Failure**               | Prevent the workflow from stopping if this action fails.                                                                                                           |
| **Enabled**                       | Toggle this action on or off for testing.                                                                                                                          |

## Update Notion Page

Use this action to overwrite an existing Notion page with the latest incident data. This is useful for keeping the retrospective page current as the incident progresses.

<Frame>
  <img alt="Update Notion Page action" src="https://mintcdn.com/rootly/iGk9QgMwzZ9PnoIQ/images/integrations/notion/workflows/image-8.png?fit=max&auto=format&n=iGk9QgMwzZ9PnoIQ&q=85&s=5b7e9f5bad75f44a2f5fd621d25b76a1" width="698" height="382" data-path="images/integrations/notion/workflows/image-8.png" />
</Frame>

<Callout icon="triangle-exclamation" color="#FEF08A">
  This is an overwrite operation. Any manual changes made to the Notion page will be replaced when this action runs.
</Callout>

| Field                          | Description                                                                                                    |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------- |
| **File**                       | The Notion page to update. Use `incident.notion_page_id` via Liquid to reference the incident's existing page. |
| **Title**                      | Updated page title. Leave blank to keep the existing title.                                                    |
| **Post Mortem Template**       | Template to apply when updating. Overwrites existing content.                                                  |
| **Show Timeline as Table**     | Include the incident timeline.                                                                                 |
| **Show Action Items as Table** | Include follow-up action items.                                                                                |
| **Skip on Failure**            | Prevent the workflow from stopping if this action fails.                                                       |
| **Enabled**                    | Toggle this action on or off for testing.                                                                      |

## Variable Reference

Use these variables in page titles and templates. Use the [Liquid Variable Explorer](https://rootly.com/account/help/liquid-explorer) to test variables with real incident data.

### Incident Variables

| Variable                  | Description                    |
| ------------------------- | ------------------------------ |
| `incident.title`          | Incident title                 |
| `incident.summary`        | Incident summary               |
| `incident.severity`       | Severity level (e.g., SEV1)    |
| `incident.status`         | Current status                 |
| `incident.started_at`     | When the incident started      |
| `incident.resolved_at`    | When the incident was resolved |
| `incident.commander.name` | Incident commander name        |
| `incident.url`            | Link to the incident in Rootly |

### Notion Variables

| Variable                   | Description                                                  |
| -------------------------- | ------------------------------------------------------------ |
| `incident.notion_page_id`  | ID of the incident's Notion page — used in the Update action |
| `incident.notion_page_url` | URL to the Notion page                                       |

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="The workflow ran but no Notion page was created" icon="circle-exclamation">
    Check the workflow run log under **Workflows → Your Workflow → View Runs** for error details. Confirm the parent page selected in the action is one Rootly was granted access to during installation. Re-authorize the integration if the connection has expired.
  </Accordion>

  <Accordion title="Manual edits to my Notion page keep getting overwritten" icon="triangle-exclamation">
    The Update Notion Page action is a full overwrite. If you need to preserve manual edits, disable any workflows that trigger an update on that page, or add conditions to prevent them from running after a certain point in the incident lifecycle.
  </Accordion>

  <Accordion title="Can I use custom Liquid templates for the page content?" icon="code">
    Yes — define a custom retrospective template in [Retrospective Templates](https://rootly.com/account/retrospective-steps?tab=documents) and select it in the Post Mortem Template field. Use the [Liquid Variable Explorer](https://rootly.com/account/help/liquid-explorer) to build and test your template.
  </Accordion>

  <Accordion title="Why are images not appearing in the timeline?" icon="image">
    Notion does not support images inside tables. Uncheck **Show Timeline as Table** to render the timeline inline, which will allow images to display correctly.
  </Accordion>
</AccordionGroup>
