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

# Introduction

> Run an action automatically whenever something happens to a task, a trip, a routing result, a data source or an alert.

An **automation** watches for an **event**, such as a task being finished, and runs an **action**, such as creating the next task, calling your own system or messaging the customer. Automations streamline task creation, assignment and placement, and with a webhook they can feed any other system.

Every automation has four parts:

| Part | What it decides | Example |
| - | - | - |
| **Event** | When the automation runs. | On Task Finished |
| **Flow** (or Data Type, Geofence Group or Alert type) | Which records the event is watched on. | Delivery |
| **Rules** | Optional conditions the record must also meet. | Customer Name is Toko Maju Jaya |
| **Automation Type** and **Automation detail** | What happens, and how. | Create Task: a Pickup task with the delivery's address |

Open **Workflow › Automation** to see the list.

> [!NOTE]
>
> Required permission:
>
> * View automation
> * Create automation, Edit automation, Delete automation

![Automation list](https://mintcdn.com/mile-app/JlYib2YfcGFk65pR/images/v4/workflow/automation/automation-list.png?fit=max\&auto=format\&n=JlYib2YfcGFk65pR\&q=85\&s=fed978e2d8085822936ee787becb757b)

1. **All types**: show only automations with one automation type (Create Task, Webhook, Notification and so on).
2. **All data**: show only automations whose event belongs to one data group: Task, Data Source, Routing Result or Location History.
3. **Search**: find an automation by name.
4. **New**: create an automation. See [Creating an automation](https://docsy3.mile.app/pages/workflow/automation/creating-an-automation.md).
5. The table columns:
   * **No.**: the row number.
   * **Name**: the automation's name.
   * **Event**: what starts it, for example On Task Finished.
   * **Automation Type**: what it does, for example Create Task.
   * **Data**: which data group the event belongs to (Task, Data Source, Routing Result or Location History).
   * **Active**: whether the automation runs.
6. **Active** switch: blue means the automation runs, grey means it is switched off and is never triggered.
7. **⋯** menu: **Edit**, **Log** and **Delete**. See [Managing automations](https://docsy3.mile.app/pages/workflow/automation/managing.md).

> [!NOTE]
>
> * Switch an automation on after you set it up. Only active automations run.
> * When several automations are active, it can take a moment for all of them to finish.
> * Check the [automation log](https://docsy3.mile.app/pages/workflow/automation/log.md) to see whether a run succeeded or failed.
> * If a change made by an automation does not show on the Task page yet, reload the page.

## Events and actions at a glance

The events, by group. Each event allows only some automation types:

| Event | Create Task | Create and Assign Task | Move Task | Assign Task | Update Task | Create or Update Data Source | Webhook | Notification |
| - | - | - | - | - | - | - | - | - |
| [On Task Created](https://docsy3.mile.app/pages/workflow/automation/events/on-task-created.md) | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ |
| [On Task Assigned](https://docsy3.mile.app/pages/workflow/automation/events/on-task-assigned.md) | ✓ | | | | | | ✓ | ✓ |
| [On Task Finished](https://docsy3.mile.app/pages/workflow/automation/events/on-task-finished.md) | ✓ | ✓ | | | | ✓ | ✓ | ✓ |
| [On Start Trip](https://docsy3.mile.app/pages/workflow/automation/events/on-start-trip.md) | | | | | | | ✓ | |
| [On Finish Trip](https://docsy3.mile.app/pages/workflow/automation/events/on-finish-trip.md) | | | | | | | ✓ | |
| [On Geofence Entry](https://docsy3.mile.app/pages/workflow/automation/events/on-geofence-entry.md) | | | | | | | ✓ | |
| [On Geofence Leave](https://docsy3.mile.app/pages/workflow/automation/events/on-geofence-leave.md) | | | | | | | ✓ | |
| [On Routing Finished](https://docsy3.mile.app/pages/workflow/automation/events/on-routing-finished.md) | | | | | | | ✓ | |
| [On Routing Dispatched](https://docsy3.mile.app/pages/workflow/automation/events/on-routing-dispatched.md) | | | | | | | ✓ | |
| [On Data Source Created](https://docsy3.mile.app/pages/workflow/automation/events/on-data-source-created.md) | ✓ | | | | | | ✓ | |
| [On Alert Created](https://docsy3.mile.app/pages/workflow/automation/events/on-alert-created.md) | ✓ | | | | | | ✓ | ✓ (Email) |
| [On Alert Resolved](https://docsy3.mile.app/pages/workflow/automation/events/on-alert-resolved.md) | ✓ | | | | | | ✓ | ✓ (Email) |

The actions:

| Automation Type | What it does |
| - | - |
| [Create Task](https://docsy3.mile.app/pages/workflow/automation/actions/create-task.md) | Creates a new task of another flow, filled from the triggering record. |
| [Create and Assign Task](https://docsy3.mile.app/pages/workflow/automation/actions/create-and-assign-task.md) | Creates a new task and places it in a hub and on a user at once. |
| [Move Task](https://docsy3.mile.app/pages/workflow/automation/actions/move-task.md) | Moves the triggering task to another hub. |
| [Assign Task](https://docsy3.mile.app/pages/workflow/automation/actions/assign-task.md) | Assigns the triggering task to a user in a hub. |
| [Update Task](https://docsy3.mile.app/pages/workflow/automation/actions/update-task.md) | Changes fields of the triggering task. |
| [Create or Update Data Source](https://docsy3.mile.app/pages/workflow/automation/actions/create-or-update-data-source.md) | Writes the task's values into a data source record. |
| [Webhook](https://docsy3.mile.app/pages/workflow/automation/actions/webhook.md) | Sends the event to a URL of your own system. |
| [Notification](https://docsy3.mile.app/pages/workflow/automation/actions/notification.md) | Sends a [WhatsApp](https://docsy3.mile.app/pages/workflow/automation/actions/notification-whatsapp.md) message, an [SMS](https://docsy3.mile.app/pages/workflow/automation/actions/notification-sms.md) or an [email](https://docsy3.mile.app/pages/workflow/automation/actions/notification-email.md). |

## Common uses

* **Chain tasks**: On Task Finished › Create Task creates the pickup after a delivery, or the inspection after an installation.
* **Distribute work**: On Task Created › Assign Task sends new tasks straight to the right driver.
* **Integrate**: any event › Webhook pushes data to an ERP, WMS, CRM or TMS in real time.
* **Keep customers informed**: On Task Assigned › Notification sends a WhatsApp message with the tracking link.
* **Keep master data current**: On Task Finished › Create or Update Data Source writes the latest customer details back to a data source.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.