> ## 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

> Configure ClickUp workflow actions to create and update tasks from Rootly incidents and action items, and map ClickUp events back to Rootly.

<Callout icon="ℹ️" color="#DBEAFE">
  To use these workflow actions, you must first connect ClickUp to Rootly. See [ClickUp Installation](/integrations/clickup/installation).
</Callout>

ClickUp organizes content in a hierarchy: **Workspaces (Teams) → Spaces → Folders → Lists**. When configuring workflow actions, select each level in order to narrow down the target list.

## Outbound Actions (Rootly → ClickUp)

<Callout icon="ℹ️" color="#DBEAFE">
  The actions in this section are used in **Incident Workflows**. They execute on changes to the Rootly incident or action item.
</Callout>

### Create a ClickUp Task for Incident

Creates a new task in a ClickUp list, linked to the Rootly incident.

| Field                     | Description                                                                     | Required |
| ------------------------- | ------------------------------------------------------------------------------- | -------- |
| **Team**                  | ClickUp workspace (Team) to use                                                 | Yes      |
| **Space**                 | ClickUp space within the selected team                                          | Yes      |
| **Folder**                | Folder within the selected space. Leave blank if the list is at the space level |          |
| **List**                  | ClickUp list where the task will be created                                     | Yes      |
| **Title**                 | Task title. Defaults to `{{ incident.title }}`. Supports Liquid                 | Yes      |
| **Description**           | Task description. Supports Liquid                                               |          |
| **Priority**              | Task priority. **Auto** mirrors the incident severity                           |          |
| **Due Date**              | Task due date. Supports Liquid                                                  |          |
| **Tags**                  | Comma-separated tags to apply to the task                                       |          |
| **Custom Fields Mapping** | JSON mapping ClickUp custom field IDs to values. Supports Liquid                |          |
| **Task Payload**          | Advanced JSON merged into the task creation request. Supports Liquid            |          |

**Priority mapping (Auto)**

| Rootly Severity | ClickUp Priority |
| --------------- | ---------------- |
| Critical        | Urgent (1)       |
| High            | High (2)         |
| Medium          | Normal (3)       |
| Low             | Low (4)          |

<Frame>
  <img alt="Document Image" src="https://mintcdn.com/rootly/yHcXrOapKHrppc-2/images/integrations/clickup/workflows/workflows-1.webp?fit=max&auto=format&n=yHcXrOapKHrppc-2&q=85&s=5a2dc84569dfca1f22ba8841aad133e0" width="879" height="1095" data-path="images/integrations/clickup/workflows/workflows-1.webp" />
</Frame>

***

### Create a ClickUp Subtask for Action Item

Creates a new task as a subtask of an existing ClickUp task, linked to a Rootly action item.

<Callout icon="ℹ️" color="#DBEAFE">
  When a **Create a ClickUp Task for Incident** action runs, Rootly stores the resulting task ID on the incident record. Reference it in the **Parent Task ID** field using Liquid to nest this subtask under the incident task.
</Callout>

| Field                     | Description                                                        | Required |
| ------------------------- | ------------------------------------------------------------------ | -------- |
| **Team**                  | ClickUp workspace (Team) to use                                    | Yes      |
| **Space**                 | ClickUp space within the selected team                             | Yes      |
| **Folder**                | Folder within the selected space                                   |          |
| **List**                  | ClickUp list where the subtask will be created                     | Yes      |
| **Parent Task ID**        | ID of the ClickUp task to nest this subtask under. Supports Liquid | Yes      |
| **Title**                 | Subtask title. Supports Liquid                                     | Yes      |
| **Description**           | Subtask description. Supports Liquid                               |          |
| **Completion**            | Subtask completion. **Auto** mirrors the action item status        | Yes      |
| **Due Date**              | Subtask due date. Supports Liquid                                  |          |
| **Tags**                  | Comma-separated tags to apply                                      |          |
| **Custom Fields Mapping** | JSON mapping ClickUp custom field IDs to values. Supports Liquid   |          |

<Frame>
  <img alt="Document Image" src="https://mintcdn.com/rootly/yHcXrOapKHrppc-2/images/integrations/clickup/workflows/workflows-2.webp?fit=max&auto=format&n=yHcXrOapKHrppc-2&q=85&s=187306ceac65265de9c0d232e0ac9347" width="883" height="1113" data-path="images/integrations/clickup/workflows/workflows-2.webp" />
</Frame>

***

### Update a ClickUp Task

Updates an existing ClickUp task linked to a Rootly incident.

| Field                     | Description                                                        | Required |
| ------------------------- | ------------------------------------------------------------------ | -------- |
| **Task ID**               | ClickUp task ID to update. Supports Liquid                         | Yes      |
| **Title**                 | Updated task title. Supports Liquid. Leave blank to keep existing  |          |
| **Description**           | Updated task description. Supports Liquid                          |          |
| **Priority**              | Updated priority                                                   |          |
| **Due Date**              | Updated due date. Supports Liquid                                  |          |
| **Tags**                  | Updated tags                                                       |          |
| **Custom Fields Mapping** | Updated custom field values as JSON. Supports Liquid               |          |
| **Task Payload**          | Advanced JSON merged into the task update request. Supports Liquid |          |

<Frame>
  <img alt="Document Image" src="https://mintcdn.com/rootly/yHcXrOapKHrppc-2/images/integrations/clickup/workflows/workflows-3.webp?fit=max&auto=format&n=yHcXrOapKHrppc-2&q=85&s=49e8271ceda014d55ec1df1c0dbb0ae3" width="874" height="891" data-path="images/integrations/clickup/workflows/workflows-3.webp" />
</Frame>

***

### Update a ClickUp Subtask

Updates an existing ClickUp subtask linked to a Rootly action item.

| Field                     | Description                                                        | Required |
| ------------------------- | ------------------------------------------------------------------ | -------- |
| **Task ID**               | ClickUp subtask ID to update. Supports Liquid                      | Yes      |
| **Title**                 | Updated subtask title. Supports Liquid                             |          |
| **Description**           | Updated subtask description. Supports Liquid                       |          |
| **Completion**            | Updated completion status. **Auto** mirrors the action item status | Yes      |
| **Due Date**              | Updated due date. Supports Liquid                                  |          |
| **Tags**                  | Updated tags                                                       |          |
| **Custom Fields Mapping** | Updated custom field values as JSON. Supports Liquid               |          |

***

### Update a ClickUp Action Item

Updates a ClickUp task that represents a Rootly action item.

| Field                     | Description                                                        | Required |
| ------------------------- | ------------------------------------------------------------------ | -------- |
| **Task ID**               | ClickUp task ID to update. Supports Liquid                         | Yes      |
| **Title**                 | Updated title. Supports Liquid                                     |          |
| **Description**           | Updated description. Supports Liquid                               |          |
| **Completion**            | Updated completion status. **Auto** mirrors the action item status | Yes      |
| **Due Date**              | Updated due date. Supports Liquid                                  |          |
| **Custom Fields Mapping** | Updated custom field values as JSON. Supports Liquid               |          |

<Frame>
  <img alt="Document Image" src="https://mintcdn.com/rootly/yHcXrOapKHrppc-2/images/integrations/clickup/workflows/workflows-4.webp?fit=max&auto=format&n=yHcXrOapKHrppc-2&q=85&s=3ddfc2ce887b8440454f164bd0bd1665" width="873" height="815" data-path="images/integrations/clickup/workflows/workflows-4.webp" />
</Frame>

***

## Inbound Events (ClickUp → Rootly)

<Callout icon="ℹ️" color="#DBEAFE">
  The actions in this section are used in **Alert Workflows**. They execute on update events sent from ClickUp via webhook.
</Callout>

When the integration is installed, Rootly registers a webhook with ClickUp to receive task events. The following events create alerts in Rootly:

| ClickUp Event | Description              |
| ------------- | ------------------------ |
| `taskCreated` | A new task was created   |
| `taskUpdated` | A task field was changed |
| `taskDeleted` | A task was deleted       |

Each event creates a Rootly alert with the following labels:

| Label      | Source                                                   |
| ---------- | -------------------------------------------------------- |
| `task_id`  | ClickUp task ID                                          |
| `event`    | Event type (`taskCreated`, `taskUpdated`, `taskDeleted`) |
| `field`    | The field that changed (for `taskUpdated` events)        |
| `username` | The user who made the change                             |
| `id`       | The history item ID (for `taskUpdated` events)           |

### Update Action Item

Use an **Alert Workflow** with the **Update Action Item** action to sync ClickUp task changes back to Rootly action items.

<Frame>
  <img alt="Document Image" src="https://mintcdn.com/rootly/yHcXrOapKHrppc-2/images/integrations/clickup/workflows/workflows-5.webp?fit=max&auto=format&n=yHcXrOapKHrppc-2&q=85&s=03e5a50f02b1ff9f6c78f727f93d3ef4" width="862" height="565" data-path="images/integrations/clickup/workflows/workflows-5.webp" />
</Frame>

<Frame>
  <img alt="Document Image" src="https://mintcdn.com/rootly/yHcXrOapKHrppc-2/images/integrations/clickup/workflows/workflows-6.webp?fit=max&auto=format&n=yHcXrOapKHrppc-2&q=85&s=3c093af2853551e5beb6a94303515d9f" width="872" height="1708" data-path="images/integrations/clickup/workflows/workflows-6.webp" />
</Frame>

### Data Mapping Syntax

Use the following Liquid template in the **Data Mapping** field to map ClickUp task update fields to Rootly action item fields:

```json theme={null}
{
  {% if alert.data.history_items[0].field == 'name' %}
    "title": "{{ alert.data.history_items[0].after }}"
  {% endif %}

  {% if alert.data.history_items[0].field == 'status' %}
    {% if alert.data.history_items[0].after.status == 'complete' %}
      "status": "done"
    {% else %}
      "status": "open"
    {% endif %}
  {% endif %}

  {% if alert.data.history_items[0].field == 'priority' %}
    {% if alert.data.history_items[0].after == null %}
      "priority": "medium"
    {% elsif alert.data.history_items[0].after.priority == 'urgent' %}
      "priority": "high"
    {% elsif alert.data.history_items[0].after.priority == 'high' %}
      "priority": "high"
    {% elsif alert.data.history_items[0].after.priority == 'normal' %}
      "priority": "medium"
    {% else %}
      "priority": "low"
    {% endif %}
  {% endif %}

  {% if alert.data.history_items[0].field == 'due_date' %}
    {% if alert.data.history_items[0].after != null %}
      {% assign date = alert.data.history_items[0].after %}
      {% assign dateInSeconds = date | divided_by: 1000 %}
      "due_date": "{{ dateInSeconds | date: "%Y-%m-%d" }}"
    {% endif %}
  {% endif %}
}
```

<Callout icon="ℹ️" color="#DBEAFE">
  ClickUp sends due dates as Unix timestamps in milliseconds. Divide by 1000 and apply the `date` filter to convert to a readable format.
</Callout>
