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

# Create automation

> Creates a new automation with the specified data source and optional Google Doc template. PDF templates are uploaded through the DocsAutomator app.



## OpenAPI

````yaml /openapi.json post /createAutomation
openapi: 3.1.0
info:
  title: DocsAutomator API
  version: '2.0'
  description: >-
    REST API for programmatic document generation, automation management, and
    e-signature workflows.
  contact:
    name: DocsAutomator Support
    email: support@docsautomator.co
    url: https://docsautomator.co
servers:
  - url: https://api.docsautomator.co
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Documents
    description: Create documents and manage async jobs
  - name: Automations
    description: CRUD operations for automations
  - name: Templates
    description: Template placeholders and duplication
  - name: E-Signatures
    description: Manage signing sessions, links, and audit trails
  - name: Email
    description: Test email delivery
paths:
  /createAutomation:
    post:
      tags:
        - Automations
      summary: Create automation
      description: >-
        Creates a new automation with the specified data source and optional
        Google Doc template. PDF templates are uploaded through the
        DocsAutomator app.
      operationId: createAutomation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - title
                - dataSourceName
              properties:
                title:
                  type: string
                  description: Name for the automation.
                dataSourceName:
                  type: string
                  enum:
                    - Airtable
                    - API
                    - ClickUp
                    - Glide
                    - Google Sheets
                    - Make
                    - n8n
                    - Noloco
                    - SmartSuite
                    - Zapier
                  description: The data source type.
                docTemplateLink:
                  type: string
                  format: uri
                  description: Google Doc template URL.
            example:
              title: Invoice Generator
              dataSourceName: API
              docTemplateLink: https://docs.google.com/document/d/1abc.../edit
      responses:
        '201':
          description: Automation created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: success
                  newAutomation:
                    $ref: '#/components/schemas/Automation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Automation:
      type: object
      properties:
        _id:
          type: string
          description: Automation ID.
        title:
          type: string
        dataSource:
          type: object
          properties:
            name:
              type: string
        dataSourceName:
          type: string
        docTemplateLink:
          type: string
          format: uri
          description: Google Doc template URL.
        newDocumentNameField:
          type: string
        isActive:
          type: boolean
        saveGoogleDoc:
          type: boolean
        locale:
          type: string
        formatNumbersWithLocale:
          type: boolean
        pdfExpiration:
          type: string
          nullable: true
        dateCreated:
          type: string
          format: date-time
        lastPreviewPdf:
          type: string
          format: uri
        esignature:
          type: object
          description: The automation's signing or acceptance step.
          properties:
            enabled:
              type: boolean
            closeType:
              type: string
              enum:
                - signature
                - acceptance
            recipientCount:
              type: integer
            signers:
              type: array
              description: >-
                Each signer as saved. `signer` is the number that
                `recipients[].signer` uses in a document request.
              items:
                type: object
                properties:
                  signer:
                    type: integer
                  role:
                    type: string
                    nullable: true
                  emailSource:
                    type: string
                    enum:
                      - static
                      - placeholder
                      - request
                    description: >-
                      static: a fixed address. placeholder: read from a field or
                      placeholder. request: given with each request in
                      `recipients`.
                  email:
                    type: string
                    nullable: true
                    description: >-
                      The fixed address, or the field or placeholder it reads.
                      Null for request.
                  name:
                    type: string
                    nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message.
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Missing required parameter
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Incorrect or missing API key
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key from your workspace settings. Pass as `Authorization: Bearer
        <key>` or `X-API-Key: <key>`. Find it at
        [app.docsautomator.co/settings/workspace/api](https://app.docsautomator.co/settings/workspace/api).

````