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

# Automation

> Automation enables you to set up automation based on tasks' events and data source's events

## What is Automation?

Automation enables you to set up automation based on tasks' events and data source's events. It might help you automate creation of tasks, task assignment, task placement, task webhook, data source update, datasource creation, data source webhook, and task component updates. Automation attributes consist of IDs, automation name, automation type, automation details, and rules. Automation logs are stored with 30-day data retention.

## Automation Types

| Type                         | Description                                                                                                                                 |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Create Task                  | Create a new task in a specified flow                                                                                                       |
| Create and Assign Task       | Create a task and immediately assign it                                                                                                     |
| Move Task                    | Transition a task to a different hub                                                                                                        |
| Assign Task                  | Assign users to a task                                                                                                                      |
| Update Task                  | Update the triggering task's own components with static values, references to other task fields, or values from a linked data source record |
| Webhook                      | Call an external HTTP endpoint                                                                                                              |
| Create or Update Data Source | Create or update a Data Source record                                                                                                       |
| Notification                 | Send a notification via messaging channel                                                                                                   |

For **Update Task**, a field value can also be sourced from a record in a data source linked to the triggering task ("From Data Source"). The picker shows only the data source fields that are **mapped** in the flow's data source configuration (the primary key is the lookup, not a selectable value). The value is fetched at the system level, so it works even when the field is restricted for the user who created the task.

**To see the details of automation object, please follow [this link](/api-reference/objects/automation-object)**

## Key Features

<CardGroup cols={2}>
  <Card title="Read automation" icon="list" href="/api-reference/flow/automation/read-automation">
    GET /automations
  </Card>

  <Card title="Read log automation" icon="list" href="/api-reference/flow/automation/read-log-automation">
    GET /automation-log
  </Card>

  <Card title="Read automation by ID" icon="list" href="/api-reference/flow/automation/read-automation-by-id">
    GET /automation/{automationId}
  </Card>

  <Card title="Create automation" icon="plus" href="/api-reference/flow/automation/create-automation">
    POST /automation
  </Card>
</CardGroup>

## Related Resources

* [Automation Object](/api-reference/objects/automation-object) - Automation data structure
