> ## 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.

# Read an automation

> Read an automation and its recent runs.



## OpenAPI

````yaml /openapi.json get /automations/{automation_id}
openapi: 3.1.0
info:
  title: Motion
  version: '2026-11-19'
  description: >-
    Create and edit Motion video projects from prompts, export MP4s and editor
    packages (Premiere, After Effects, Resolve, Final Cut), and manage
    templates, brand kits, library uploads, connectors, automations, and social
    posts.
servers:
  - url: https://api.motion.so/api/motion
security:
  - MotionApiKey: []
tags:
  - name: Projects
  - name: Exports
  - name: Library
  - name: Templates
  - name: Brand kits
  - name: Connectors
    description: Connect services and control the actions a project may use.
  - name: Automations
  - name: Social posting
paths:
  /automations/{automation_id}:
    get:
      tags:
        - Automations
      summary: Read an automation
      description: Read an automation and its recent runs.
      operationId: get_automation
      parameters:
        - name: automation_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
          description: ID returned by list or create.
        - $ref: '#/components/parameters/MotionApiVersion'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationEnvelope'
              example:
                automation:
                  id: auto_01j9x4m8n9p0q1r2s3t4u5v6
                  name: Daily product update
                  enabled: true
                  prompt: >-
                    Create a 15-second 16:9 animated update summarizing the
                    latest release notes.
                  trigger:
                    type: schedule_recurring
                    platform: schedule
                    label: Every 24 hours
                    source: Schedule
                    interval_minutes: 1440
                  created_at: '2026-11-18T14:00:00Z'
                  updated_at: '2026-11-19T14:02:18Z'
                  next_run_at: '2026-11-20T14:00:00Z'
                  runs:
                    - id: run_01j9x5q2k7w8m4n3p6r9s1t2
                      status: completed
                      motion_agent_chat_id: 4f20dcdd-f63b-4898-97d6-2e05c0d37c78
                      queued_at: '2026-11-19T14:00:00Z'
                      started_at: '2026-11-19T14:00:03Z'
                      completed_at: '2026-11-19T14:02:18Z'
                      attempt: 1
                      result_summary: Created the daily product update video.
                      error: null
                  memory:
                    remember_processed_items: true
                    include_previous_runs: 5
                    compact_after_runs: 20
                  max_concurrent_runs: 1
                  max_runs_per_hour: 4
        '400':
          description: Invalid query parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '401':
          description: Missing or invalid authentication credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '403':
          description: Missing required scope or plan access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '404':
          description: Automation or run not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '503':
          description: Temporarily unavailable; retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
      security:
        - MotionApiKey: []
        - MotionOAuth:
            - motion:automations:read
components:
  parameters:
    MotionApiVersion:
      name: Motion-API-Version
      in: header
      required: false
      description: >-
        Optional API version override for this request. When omitted, Motion
        uses the API version pinned to your API key or OAuth connection.
      schema:
        type: string
        enum:
          - '2026-11-19'
        default: '2026-11-19'
  schemas:
    AutomationEnvelope:
      type: object
      properties:
        automation:
          $ref: '#/components/schemas/Automation'
      required:
        - automation
      additionalProperties: false
    AutomationError:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
      additionalProperties: false
    Automation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        enabled:
          type: boolean
        prompt:
          type: string
        trigger:
          type: object
          properties:
            type:
              type: string
              enum:
                - schedule_once
                - schedule_recurring
                - youtube_video_uploaded
                - youtube_stream_ended
                - youtube_channel_content
                - twitch_stream_ended
                - kick_stream_ended
                - website_changed
            platform:
              type: string
              enum:
                - schedule
                - youtube
                - twitch
                - kick
                - website
            source:
              type: string
          required:
            - type
            - platform
            - source
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        next_run_at:
          type:
            - string
            - 'null'
          format: date-time
        runs:
          type: array
          items:
            $ref: '#/components/schemas/AutomationRun'
        memory:
          $ref: '#/components/schemas/AutomationMemory'
        connector_policy:
          $ref: '#/components/schemas/AutomationConnectorPolicy'
        max_concurrent_runs:
          type: integer
        max_runs_per_hour:
          type: integer
      required:
        - id
        - name
        - enabled
        - prompt
        - trigger
        - created_at
        - updated_at
        - next_run_at
        - runs
      additionalProperties: true
      description: An automation definition and its configuration.
    AutomationRun:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - queued
            - running
            - completed
            - skipped
            - failed
            - blocked
        motion_agent_chat_id:
          type:
            - string
            - 'null'
          description: >-
            Project chat ID once created. Open
            https://motion.so/agent?chat={motion_agent_chat_id} to inspect the
            run.
        queued_at:
          type: string
          format: date-time
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        attempt:
          type: integer
        result_summary:
          type:
            - string
            - 'null'
        error:
          type:
            - string
            - 'null'
      required:
        - id
        - status
        - motion_agent_chat_id
        - queued_at
      additionalProperties: true
      description: A single automation run and its linked project.
    AutomationMemory:
      type: object
      properties:
        remember_processed_items:
          type: boolean
        include_previous_runs:
          type: integer
          minimum: 0
          maximum: 20
        compact_after_runs:
          type: integer
          minimum: 5
          maximum: 100
      required:
        - remember_processed_items
        - include_previous_runs
        - compact_after_runs
      additionalProperties: false
    AutomationConnectorPolicy:
      type: object
      properties:
        mode:
          type: string
          enum:
            - none
            - fixed
            - conditional
        on_unavailable:
          type: string
          enum:
            - block
            - run_without
        grants:
          type: array
          maxItems: 6
          items:
            $ref: '#/components/schemas/AutomationConnectorGrant'
      required:
        - mode
        - on_unavailable
        - grants
      additionalProperties: false
      description: Controls which connected services an automation may read during a run.
    AutomationConnectorGrant:
      type: object
      properties:
        connector_id:
          type: string
          enum:
            - github
            - notion
            - google-drive
            - getty
        access:
          type: string
          enum:
            - read
        resources:
          type: array
          maxItems: 50
          items:
            type: string
            minLength: 1
            maxLength: 2000
        condition:
          $ref: '#/components/schemas/AutomationConnectorCondition'
      required:
        - connector_id
        - access
        - resources
      additionalProperties: false
    AutomationConnectorCondition:
      type: object
      properties:
        event_types:
          type: array
          items:
            type: string
            enum:
              - schedule_once
              - schedule_recurring
              - youtube_video_uploaded
              - youtube_stream_ended
              - youtube_channel_content
              - twitch_stream_ended
              - kick_stream_ended
        payload_field:
          type: string
          maxLength: 200
        equals:
          type: string
          maxLength: 2000
      required: []
      additionalProperties: false
  securitySchemes:
    MotionApiKey:
      type: http
      scheme: bearer
      description: >-
        A Motion API key. Access is limited to its stored organization,
        workspace, scopes and the creator’s current permissions.
    MotionOAuth:
      type: oauth2
      description: OAuth 2.1 bearer token issued by Motion (https://mcp.motion.so/mcp).
      flows:
        authorizationCode:
          authorizationUrl: https://mcp.motion.so/oauth/authorize
          tokenUrl: https://mcp.motion.so/oauth/token
          scopes:
            motion:automations:read: Read automation definitions, capabilities, runs, and analytics.
            motion:automations:write: Create, edit, delete, invoke, and retry automations.
            motion:connectors:read: Read available services, connected accounts, and allowed actions.
            motion:connectors:write: Connect and disconnect workspace services.
            motion:templates:read: Read and preview accessible templates.
            motion:templates:write: Create, edit, share, and archive prompt templates.
            motion:assets:read: Find and read permitted media library assets.
            motion:brand-kits:read: Read permitted brand kits.
            motion:brand-kits:write: Create, update, and delete brand kits.
            motion:social:read: Read authorized social accounts and posts.
            motion:social:write: Draft, submit, approve, and cancel social posts.
            motion:projects:read: Read projects, generations and exports.
            motion:projects:write: >-
              Create and edit projects, send messages and request exports. Uses
              workspace credits.
            motion:assets:write: Create and complete reusable media library uploads.

````

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