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

# Automations

> Schedule recurring or event-triggered video workflows that launch Motion projects automatically.

An **Automation** is a saved workflow combining a **prompt**, a **trigger** (one-time schedule, recurring schedule, or channel/stream event), a **connector policy**, and **memory** settings so Motion runs video production automatically.

Every triggered run creates an **Automation Run** linked to a standard Motion [Project](https://docs.motion.so/api/projects) (`run.motion_agent_chat_id`). Once that project ID is populated, inspect its saved **[Generations](https://docs.motion.so/api/projects#the-generation-object)** and **[Exports](https://docs.motion.so/api/exports)** via `GET /projects/{id}` or open `https://motion.so/agent?chat={motion_agent_chat_id}`.

> [!NOTE]
>
> **Plan & scopes:** Automations require a **Pro** plan or above, with `motion:automations:read` to inspect capabilities, automations, runs, and analytics, and `motion:automations:write` to create, edit, delete, trigger, or retry runs.

## Triggers & safeguards

* **Schedules:** `schedule_once` (exact future ISO-8601 `run_at` with timezone offset) or `schedule_recurring` (`interval_minutes`).
* **Channel & stream events:** Call `GET /automations/capabilities` to see which event triggers are enabled in your workspace (`youtube_video_uploaded`, `youtube_channel_content`, `youtube_stream_ended`, `twitch_stream_ended`, `kick_stream_ended`).
* **Policies & safety caps:** Configure `connector_policy` (`none`, `fixed`, `conditional`), `memory` (avoid reprocessing prior items), `max_concurrent_runs`, and `max_runs_per_hour`. Pass a UUID `Idempotency-Key` header on `POST /automations/{automation_id}/run` for safe manual retries.

## The Automation object

```json theme={null}
{
  "automation": {
    "id": "a1b2c3d4-5678-4abc-9def-0123456789ab",
    "name": "Daily product update",
    "enabled": true,
    "prompt": "Create a 15-second 16:9 animated recap of our latest GitHub release.",
    "trigger": {
      "type": "schedule_recurring",
      "platform": "schedule",
      "label": "Every 24 hours",
      "source": "Schedule",
      "interval_minutes": 1440
    },
    "next_run_at": "2026-11-24T09:00:00.000Z",
    "max_concurrent_runs": 1,
    "max_runs_per_hour": 2
  },
  "run": {
    "id": "f9876543-210a-4bcd-8ef0-112233445566",
    "status": "completed",
    "motion_agent_chat_id": "8a4f2c1e-7b62-4e11-9d2a-1c3b5e7f9012",
    "queued_at": "2026-11-23T09:00:00.000Z",
    "started_at": "2026-11-23T09:00:03.000Z",
    "completed_at": "2026-11-23T09:02:48.000Z",
    "attempt": 1,
    "result_summary": "Created 15s release recap composition.",
    "error": null
  }
}
```

**automation.id** `string`

Unique UUID for the automation workflow.

**automation.enabled** `boolean`

When `false`, future triggers are paused without interrupting runs already in progress.

**automation.trigger** `object`

Schedule or channel-event trigger configuration (`type`, `platform`, `label`, `source`, plus `interval_minutes` or `run_at`).

**automation.connector\_policy** `object`

Controls which connected services runs may read (`mode`: `none`, `fixed`, or `conditional`; `on_unavailable`: `block` or `run_without`; and `grants[]`).

**automation.memory** `object`

Cross-run memory configuration (`remember_processed_items`, `include_previous_runs`, `compact_after_runs`).

**run.status** `enum`

Execution state of a run: `queued`, `running`, `completed`, `skipped`, `failed`, or `blocked`.

**run.motion\_agent\_chat\_id** `string | null`

UUID of the Motion [Project](https://docs.motion.so/api/projects) created by this run. Pass to `GET /projects/{id}` to read its saved generations and exports.

## Endpoints

| Method & Path | Description |
| - | - |
| [`GET /automations/capabilities`](https://docs.motion.so/api/automations/capabilities) | Inspect available triggers and workspace automation capabilities. |
| [`GET /automations`](https://docs.motion.so/api/automations/list) | List workspace automations. |
| [`POST /automations`](https://docs.motion.so/api/automations/create) | Create a scheduled or event-triggered automation. |
| [`GET /automations/{automation_id}`](https://docs.motion.so/api/automations/retrieve) | Retrieve an automation's configuration and recent runs. |
| [`PATCH /automations/{automation_id}`](https://docs.motion.so/api/automations/update) | Update prompt, trigger, connector policy, or pause/resume (`enabled`). |
| [`DELETE /automations/{automation_id}`](https://docs.motion.so/api/automations/delete) | Delete an automation (in-progress runs finish cleanly). |
| [`POST /automations/{automation_id}/run`](https://docs.motion.so/api/automations/run) | Trigger an automation run immediately (supports `Idempotency-Key`). |
| [`GET /automations/{automation_id}/runs`](https://docs.motion.so/api/automations/list-runs) | List run history for an automation. |
| [`GET /automations/{automation_id}/runs/{run_id}`](https://docs.motion.so/api/automations/retrieve-run) | Retrieve a run's status, `motion_agent_chat_id`, summary, and error. |
| [`POST /automations/{automation_id}/runs/{run_id}/retry`](https://docs.motion.so/api/automations/retry-run) | Retry a failed or blocked automation run. |
| [`GET /automations/{automation_id}/analytics`](https://docs.motion.so/api/automations/analytics) | Retrieve success rates, run counts, and execution metrics. |


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