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

# Task Automation

> Manage automation rules that automatically create tasks when configured trigger events occur.

The Task Automation page lets authorized users view, create, edit, and delete automation rules that trigger task creation based on platform events. It is reached at `/tasks/automation`.

## Overview

The page is wrapped in a `PermissionGate` for `pf.task_automation.view`. It displays a list of automation rules, each showing:

* Rule name and trigger type.
* Associated task template (if any).
* Active / Disabled badge.

Creating and editing rules opens `TaskAutomationRuleFormDialog`. Deleting a rule requires confirmation. The **New Rule** button is additionally gated by `pf.task_automation.manage`.

## Who it's for

Requires `pf.task_automation.view` to view rules. Requires `pf.task_automation.manage` to create, edit, or delete rules. No explicit route-level permission guard — the route at `/tasks/automation` is accessible to authenticated users, with the `PermissionGate` enforcing view access.

## Before you start

* Task templates should exist if you want to associate them with rules (see `/tasks/templates`).
* Your account must have `pf.task_automation.manage` to create or modify rules.

## Steps

1. Navigate to **Tasks → Automation** (`/tasks/automation`).
2. Review existing automation rules and their enabled/disabled states.
3. To create a rule, click **New Rule**, fill in the form, and save.
4. To edit a rule, click the pencil icon on the rule card.
5. To delete a rule, click the trash icon (confirms before deleting).

## Key concepts

**Trigger type** — the platform event that fires the rule (e.g., a status change on another entity).

**Task template** — the template used to pre-populate the task created by the rule.

**Enabled / Disabled** — rules with a "Disabled" badge are saved but not active.

## Related

<Columns cols={2}>
  <Card title="Platform Foundation" icon="layer-group" href="/pf/overview">
    Platform Foundation overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index" />
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/platform.tsx
  * src/platform/tasks/pages/TaskAutomationPage.tsx
  * src/platform/tasks/hooks/useTaskAutomationRules.ts
  * src/platform/tasks/components/TaskAutomationRuleFormDialog.tsx
</Accordion>
