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

# 列出自动化模板

> 列出内置自动化模板。

创建端点接受 `template_id` 值；如果创建时省略
`tools.mcp_servers`，则使用模板的
`required_mcps`。

<div id="permissions">
  ## 权限
</div>

需要一个在组织级别拥有 `ViewOrgAutomations` 权限的服务用户。

<div id="usage">
  ## 用量
</div>

列出内置自动化模板。创建端点接受 `template_id` 值作为来源标记；如果创建时省略 `tools.mcp_servers`，则使用该模板的 `required_mcps`。


## OpenAPI

````yaml zh/v3-openapi.yaml GET /v3/organizations/{org_id}/automations/templates
openapi: 3.1.0
info:
  description: 采用 Service User 身份验证和 RBAC 的 Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/organizations/{org_id}/automations/templates:
    get:
      tags:
        - automations
      summary: 列出自动化模板
      description: |-
        列出内置自动化模板。

        创建端点接受 `template_id` 值；如果创建时省略
        `tools.mcp_servers`，则使用模板的
        `required_mcps`。
      operationId: >-
        handle_list_automation_templates_v3_organizations__org_id__automations_templates_get
      parameters:
        - description: 组织 ID（前缀：org-）
          in: path
          name: org_id
          required: true
          schema:
            example: org-abc123def456
            title: Org Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationTemplatesResponse'
          description: 成功响应
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未授权
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 禁止访问
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未找到
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 冲突
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 无法处理的内容
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 请求过多
components:
  schemas:
    AutomationTemplatesResponse:
      additionalProperties: false
      properties:
        templates:
          items:
            $ref: '#/components/schemas/AutomationTemplateResponse'
          title: Templates
          type: array
      required:
        - templates
      title: AutomationTemplatesResponse
      type: object
    ProblemDetail:
      description: >-
        v3 API 的 RFC 9457 application/problem+json 错误响应体。


        detail 沿用自旧版 {"detail": ...} 响应体，以保持向后兼容；其他成员字段为新增字段。errors
        包含字段级验证失败信息（仅 422）。
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: 针对此次具体情况的、便于人理解的说明。
          title: Detail
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: 字段级验证错误（仅适用于 422 响应）。
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: 此次出现对应的 URI 引用（请求路径）。
          title: Instance
        status:
          description: HTTP 状态码。
          title: Status
          type: integer
        title:
          description: 对问题类型的简短、便于理解的概述。
          title: Title
          type: string
        type:
          default: about:blank
          description: 用于标识问题类型的 URI 引用。
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    AutomationTemplateResponse:
      additionalProperties: false
      properties:
        actions:
          items:
            discriminator:
              mapping:
                message_session:
                  $ref: '#/components/schemas/AutomationMessageSessionAction'
                monitor_session:
                  $ref: '#/components/schemas/AutomationMonitorSessionAction'
                start_session:
                  $ref: '#/components/schemas/AutomationStartSessionAction-Output'
              propertyName: type
            oneOf:
              - $ref: '#/components/schemas/AutomationStartSessionAction-Output'
              - $ref: '#/components/schemas/AutomationMessageSessionAction'
              - $ref: '#/components/schemas/AutomationMonitorSessionAction'
          title: Actions
          type: array
        category:
          title: Category
          type: string
        description:
          title: Description
          type: string
        docs_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Docs Url
        featured:
          default: false
          title: Featured
          type: boolean
        name:
          title: Name
          type: string
        required_integrations:
          items:
            type: string
          title: Required Integrations
          type: array
        required_mcps:
          items:
            type: string
          title: Required Mcps
          type: array
        template_id:
          title: Template Id
          type: string
        triggers:
          items:
            $ref: '#/components/schemas/AutomationTriggerRequest-Output'
          title: Triggers
          type: array
      required:
        - template_id
        - name
        - description
        - category
        - required_integrations
        - required_mcps
        - triggers
        - actions
      title: AutomationTemplateResponse
      type: object
    AutomationMessageSessionAction:
      additionalProperties: false
      properties:
        auto_create:
          default: false
          description: 为 true 时，首次触发会创建一个归自动化所有的新长期运行会话，后续触发会向该会话发送消息。
          title: Auto Create
          type: boolean
        prompt:
          description: 触发事件的 payload 会自动追加。
          title: Prompt
          type: string
        target_devin_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            必须属于该组织；编辑包含此 action 的自动化时，需要拥有目标会话的写入权限（仅启用/禁用的编辑除外）。除非 auto_create
            为 true，否则此项必填；如果为 true，首次触发创建会话后将由服务端设置，客户端提供的值会被忽略。
          title: Target Devin Id
        type:
          const: message_session
          default: message_session
          title: Type
          type: string
      required:
        - prompt
      title: AutomationMessageSessionAction
      type: object
    AutomationMonitorSessionAction:
      additionalProperties: false
      properties:
        setup_prompt:
          description: 注入到会话的系统提示中。引用令牌语法与 prompt 相同。
          title: Setup Prompt
          type: string
        slack_monitor_config:
          $ref: '#/components/schemas/AutomationSlackMonitorConfig'
          description: 同一频道必须恰有一个 slack:message 触发器。
        type:
          const: monitor_session
          default: monitor_session
          title: Type
          type: string
      required:
        - setup_prompt
        - slack_monitor_config
      title: AutomationMonitorSessionAction
      type: object
    AutomationStartSessionAction-Output:
      additionalProperties: false
      properties:
        prompt:
          description: >-
            唯一可信来源：包含内联引用令牌的纯文本（@{owner}/{repo}、@{path}、@playbook:{id}、@skills:{name}、!{macro}、${SECRET_NAME}）。保存时会验证带类型前缀的令牌；未知
            ID 将返回 400。触发事件的 payload 会自动附加。
          title: Prompt
          type: string
        session:
          $ref: '#/components/schemas/AutomationSessionConfig-Output'
          description: 生成的会话的配置。
        type:
          const: start_session
          default: start_session
          title: Type
          type: string
      required:
        - prompt
      title: AutomationStartSessionAction
      type: object
    AutomationTriggerRequest-Output:
      additionalProperties: false
      properties:
        conditions:
          anyOf:
            - $ref: '#/components/schemas/AutomationConditions-Output'
            - type: 'null'
          description: null 匹配所有事件。
        event_type:
          description: 触发事件类型，例如 'github:pull_request'。
          enum:
            - github:issue_comment
            - github:issues
            - github:pull_request
            - github:pull_request_review
            - github:pull_request_review_comment
            - github:check_run
            - github:push
            - gitlab:merge_request
            - gitlab:note
            - gitlab:issue
            - gitlab:issue_note
            - gitlab:push
            - gitlab:pipeline
            - schedule:recurring
            - slack:message
            - slack:reaction_added
            - linear:create
            - linear:label_added
            - linear:assigned
            - linear:status_changed
            - linear:priority_changed
            - linear:moved
            - jira:issue_created
            - jira:label_added
            - jira:status_changed
            - jira:assigned
            - pylon:issue_created
            - pylon:issue_tag_added
            - pylon:issue_status_changed
            - incident_io:incident_created
            - incident_io:status_changed
            - incident_io:severity_changed
            - incident_io:follow_up_created
            - webhook:incoming
            - snapshot_build:completed
          title: Event Type
          type: string
        replies:
          default: []
          description: 此触发器的会话绑定位置及响应发送位置。仅执行匹配到的触发器的回复；所有条目彼此独立，并会去重。
          items:
            $ref: '#/components/schemas/AutomationReply'
          title: Replies
          type: array
      required:
        - event_type
      title: AutomationTriggerRequest
      type: object
    AutomationSlackMonitorConfig:
      additionalProperties: false
      properties:
        source_channel_id:
          title: Source Channel Id
          type: string
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
      required:
        - source_channel_id
      title: AutomationSlackMonitorConfig
      type: object
    AutomationSessionConfig-Output:
      additionalProperties: false
      properties:
        bypass_approval:
          default: false
          description: 自动批准创建子会话（这是此开关唯一绕过的检查）；未来任何可绕过的检查都需要新字段。
          title: Bypass Approval
          type: boolean
        notifications:
          anyOf:
            - $ref: '#/components/schemas/AutomationSessionNotificationsConfig'
            - type: 'null'
          description: 会话内容通知（目前仅支持 Slack）。
        platform:
          anyOf:
            - type: string
            - type: 'null'
          description: 会话的 VM 平台。为 null 时，会话会在调用时使用组织的默认平台。
          title: Platform
        playbook_id:
          anyOf:
            - type: string
            - type: 'null'
          description: '只读：从提示中的第一个 @playbook: 令牌派生。'
          title: Playbook Id
        repos:
          default: []
          description: 只读：从提示中的 repo 令牌派生。
          items:
            type: string
          title: Repos
          type: array
        tags:
          default: []
          description: 会话标签。对于强制执行标签的企业，必须恰好提供一个允许的值。
          items:
            type: string
          title: Tags
          type: array
      title: AutomationSessionConfig
      type: object
    AutomationConditions-Output:
      additionalProperties: false
      properties:
        any:
          description: AND 组的 OR（固定的两层 DNF）。
          items:
            $ref: '#/components/schemas/AutomationConditionGroup'
          title: Any
          type: array
      required:
        - any
      title: AutomationConditions
      type: object
    AutomationReply:
      additionalProperties: false
      properties:
        type:
          description: >-
            notify_thread：在分派时向触发会话线程单向发送“会话已启动”标记（Slack
            触发器）。attach_thread：在分派时与触发会话线程建立双向绑定（Slack 触发器）。post_response：将
            Agent 的响应发送到触发上下文。
          enum:
            - notify_thread
            - attach_thread
            - post_response
          title: Type
          type: string
      required:
        - type
      title: AutomationReply
      type: object
    AutomationSessionNotificationsConfig:
      additionalProperties: false
      description: |-
        启动的会话内容的发送位置，而非自动化级别的
        ``notifications`` 组（调度状态提醒）。
      properties:
        slack:
          anyOf:
            - $ref: '#/components/schemas/AutomationSessionSlackConfig'
            - type: 'null'
          description: >-
            为会话指定 Slack 归属位置：首次投递绑定会话线程后，post_updates/forward_thread 和
            post_response 均支持双向通信。
      title: AutomationSessionNotificationsConfig
      type: object
    AutomationConditionGroup:
      additionalProperties: false
      properties:
        all:
          description: AND：组中的每个条件都必须匹配。
          items:
            discriminator:
              mapping:
                between:
                  $ref: '#/components/schemas/AutomationRangeCondition'
                contains:
                  $ref: '#/components/schemas/AutomationStringCondition'
                ends_with:
                  $ref: '#/components/schemas/AutomationStringCondition'
                eq:
                  $ref: '#/components/schemas/AutomationComparisonCondition'
                globs:
                  $ref: '#/components/schemas/AutomationGlobCondition'
                gt:
                  $ref: '#/components/schemas/AutomationNumericCondition'
                gte:
                  $ref: '#/components/schemas/AutomationNumericCondition'
                in:
                  $ref: '#/components/schemas/AutomationListCondition'
                is_empty:
                  $ref: '#/components/schemas/AutomationEmptyCondition'
                is_not_empty:
                  $ref: '#/components/schemas/AutomationEmptyCondition'
                lt:
                  $ref: '#/components/schemas/AutomationNumericCondition'
                lte:
                  $ref: '#/components/schemas/AutomationNumericCondition'
                matches:
                  $ref: '#/components/schemas/AutomationMatchCondition'
                neq:
                  $ref: '#/components/schemas/AutomationComparisonCondition'
                not_contains:
                  $ref: '#/components/schemas/AutomationStringCondition'
                not_ends_with:
                  $ref: '#/components/schemas/AutomationStringCondition'
                not_globs:
                  $ref: '#/components/schemas/AutomationGlobCondition'
                not_in:
                  $ref: '#/components/schemas/AutomationListCondition'
                not_matches:
                  $ref: '#/components/schemas/AutomationMatchCondition'
                not_starts_with:
                  $ref: '#/components/schemas/AutomationStringCondition'
                recurrence:
                  $ref: '#/components/schemas/AutomationRecurrenceCondition'
                starts_with:
                  $ref: '#/components/schemas/AutomationStringCondition'
              propertyName: operator
            oneOf:
              - $ref: '#/components/schemas/AutomationComparisonCondition'
              - $ref: '#/components/schemas/AutomationStringCondition'
              - $ref: '#/components/schemas/AutomationNumericCondition'
              - $ref: '#/components/schemas/AutomationEmptyCondition'
              - $ref: '#/components/schemas/AutomationRangeCondition'
              - $ref: '#/components/schemas/AutomationListCondition'
              - $ref: '#/components/schemas/AutomationMatchCondition'
              - $ref: '#/components/schemas/AutomationRecurrenceCondition'
              - $ref: '#/components/schemas/AutomationGlobCondition'
          title: All
          type: array
      required:
        - all
      title: AutomationConditionGroup
      type: object
    AutomationSessionSlackConfig:
      additionalProperties: false
      properties:
        channel_id:
          title: Channel Id
          type: string
        mode:
          description: >-
            post_updates：会话在频道中的会话线程内交谈（适用于非 Slack
            触发器）。forward_thread：与前者相同，另外会在触发会话线程中发布回链（需要 Slack
            触发器）。post_response：会话的最终响应将作为顶级消息发布到频道，然后绑定其会话线程以接收回复和后续消息（适用于任何触发器）。
          enum:
            - post_updates
            - forward_thread
            - post_response
          title: Mode
          type: string
      required:
        - mode
        - channel_id
      title: AutomationSessionSlackConfig
      type: object
    AutomationRangeCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          const: between
          title: Operator
          type: string
        value:
          description: 闭区间 [low, high]。
          maxItems: 2
          minItems: 2
          prefixItems:
            - anyOf:
                - type: integer
                - type: number
            - anyOf:
                - type: integer
                - type: number
          title: Value
          type: array
      required:
        - field
        - operator
        - value
      title: AutomationRangeCondition
      type: object
    AutomationStringCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
            - contains
            - not_contains
            - starts_with
            - not_starts_with
            - ends_with
            - not_ends_with
          title: Operator
          type: string
        value:
          title: Value
          type: string
      required:
        - field
        - operator
        - value
      title: AutomationStringCondition
      type: object
    AutomationComparisonCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
            - eq
            - neq
          title: Operator
          type: string
        value:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: boolean
          title: Value
      required:
        - field
        - operator
        - value
      title: AutomationComparisonCondition
      type: object
    AutomationGlobCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
            - globs
            - not_globs
          title: Operator
          type: string
        value:
          description: Glob 模式；任意变更路径匹配即可（github:push、gitlab:push）。
          items:
            type: string
          title: Value
          type: array
      required:
        - field
        - operator
        - value
      title: AutomationGlobCondition
      type: object
    AutomationNumericCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
            - gt
            - lt
            - gte
            - lte
          title: Operator
          type: string
        value:
          anyOf:
            - type: integer
            - type: number
          title: Value
      required:
        - field
        - operator
        - value
      title: AutomationNumericCondition
      type: object
    AutomationListCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
            - in
            - not_in
          title: Operator
          type: string
        value:
          items:
            type: string
          title: Value
          type: array
      required:
        - field
        - operator
        - value
      title: AutomationListCondition
      type: object
    AutomationEmptyCondition:
      additionalProperties: false
      description: 一元运算符：根据字段是否为空进行匹配；`value` 不携带任何数据。
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
            - is_empty
            - is_not_empty
          title: Operator
          type: string
        value:
          title: Value
          type: 'null'
      required:
        - field
        - operator
      title: AutomationEmptyCondition
      type: object
    AutomationMatchCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
            - matches
            - not_matches
          title: Operator
          type: string
        value:
          description: 正则表达式。
          title: Value
          type: string
      required:
        - field
        - operator
        - value
      title: AutomationMatchCondition
      type: object
    AutomationRecurrenceCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          const: recurrence
          title: Operator
          type: string
        value:
          description: >-
            schedule:recurring 的 rrule 字段使用的 iCalendar RRULE，例如
            FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0
          title: Value
          type: string
      required:
        - field
        - operator
        - value
      title: AutomationRecurrenceCondition
      type: object
  securitySchemes:
    bearerAuth:
      description: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````