---
title: "Run an automation now"
method: POST
path: "/automations/{automation_id}/run"
tags: ["Automations"]
---

# Run an automation now

`POST /automations/{automation_id}/run`

## Request

- Base URL: `https://api.motion.so/api/motion`
- URL: `https://api.motion.so/api/motion/automations/{automation_id}/run`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://mcp.motion.so/oauth/authorize`
    - Token URL: `https://mcp.motion.so/oauth/token` scopes: `motion:automations:write`
- TypeScript: <https://skmtc.dev/motion/apis/mosaic-motion/docs/automations/:automation_id/run/post.ts> (a function with typed inputs; its response is checked against the schema)

Schedule automations only; channel automations require a real source event. New invocations open a new Motion chat and may use credits. Send no body. Requires motion:automations:write for OAuth tokens. API keys use the owner account permissions. Automation access must be enabled for the account and environment. See /guides/automations. Automations execute only with GVA; Claude supports reads, pause, and delete only.

## Path parameters

- `automation_id` string, required

## Headers

- `Idempotency-Key` string, uuid, required

## Response `200`

Existing invocation returned for a reused UUID.

- AutomationInvocation
  - `automation` Automation, required: Owner-scoped read view. Read responses can include additional saved context and history. Use the dedicated run-history endpoint for pagination. Read fields are not accepted as write inputs.
    - `id` string, required
    - `name` string, required
    - `enabled` boolean, required
    - `prompt` string, required
    - `trigger` object, required
      - `type` string, required
      - `platform` string, required
      - `source` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `nextRunAt` string, date-time, nullable, required
    - `runs` AutomationRun[], required
      - `id` string, required
      - `status` 'queued' | 'running' | 'completed' | 'skipped' | 'failed' | 'blocked', required
      - `motionAgentChatId` string, nullable, required: Null until a Motion chat is created. Open https://motion.so/agent?chat={motionAgentChatId} to inspect the run.
      - `queuedAt` string, date-time, required
      - `startedAt` string, date-time, nullable
      - `completedAt` string, date-time, nullable
      - `attempt` integer
      - `resultSummary` string, nullable
      - `error` string, nullable
    - `memory` AutomationMemory
      - `rememberProcessedItems` boolean, required
      - `includePreviousRuns` integer, required
      - `compactAfterRuns` integer, required
    - `connectorPolicy` AutomationConnectorPolicy: Uses existing connected accounts and permissions; this request cannot connect an account or grant access.
      - `mode` 'none' | 'fixed' | 'conditional', required
      - `onUnavailable` 'block' | 'run_without', required
      - `grants` AutomationConnectorGrant[], required
        - `connectorId` 'github' | 'notion' | 'figma' | 'google-drive' | 'dropbox' | 'getty', required
        - `access` 'read', required
        - `resources` string[], required
        - `condition` AutomationConnectorCondition
          - `eventTypes` string[]
          - `payloadField` string
          - `equals` string
    - `maxConcurrentRuns` integer
    - `maxRunsPerHour` integer
  - `run` AutomationRun, required: Read view can also include event context, logs, artifacts, and connector snapshots. An accepted or completed agent run is not proof of a downloadable video; inspect saved exports in its Motion chat.
    - `id` string, required
    - `status` 'queued' | 'running' | 'completed' | 'skipped' | 'failed' | 'blocked', required
    - `motionAgentChatId` string, nullable, required: Null until a Motion chat is created. Open https://motion.so/agent?chat={motionAgentChatId} to inspect the run.
    - `queuedAt` string, date-time, required
    - `startedAt` string, date-time, nullable
    - `completedAt` string, date-time, nullable
    - `attempt` integer
    - `resultSummary` string, nullable
    - `error` string, nullable
  - `session` AutomationSession, required
    - `id` string, required
    - `runId` string, required
    - `motionAgentChatId` string, nullable, required
    - `status` string, required
  - `deduplicated` boolean, required

## Other responses

- `202`: Success
- `400`: Invalid input or cursor; read the error message.
- `401`: Missing, invalid, or wrong-audience credential.
- `403`: Missing OAuth scope, account automation access, or engine access.
- `404`: Unavailable environment, or automation/run not owned by this account.
- `409`: automation_paused: resume before running.
- `503`: Temporarily unavailable; retry later.

## Changes

- **2026-10-20** `075b364b747d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/motion/apis/mosaic-motion/changes/automations/:automation_id/run/post.md)

---

[API](https://skmtc.dev/motion/apis/mosaic-motion.md) - [All operations](https://skmtc.dev/motion/apis/mosaic-motion/llms.txt) - [OpenAPI document](https://skmtc.dev/motion/apis/mosaic-motion/revisions/075b364b747d?raw)
