---
title: "Update automation"
method: PUT
path: "/updateAutomation"
tags: ["Automations"]
---

# Update automation

`PUT /updateAutomation`

Updates an existing automation's settings. Only the fields included in the request body are updated.

## Query parameters

- `docId` string, required

## Request body

- object
  - `title` string — Automation name.
  - `docTemplateLink` string, uri — Google Doc template URL.
  - `newDocumentNameField` string — Field name or formula for generated document names.
  - `isActive` boolean — Whether the automation is active.
  - `saveGoogleDoc` boolean — Save a Google Doc copy alongside the PDF.
  - `googleDocDestinationFolderUrl` string, uri — Google Drive folder URL for saved documents.
  - `locale` string — Locale for date and number formatting (e.g., `en-us`, `de-de`).
  - `formatNumbersWithLocale` boolean — Format numbers using the automation's locale.
  - `pdfExpiration` 'never' | 'immediate' | 'oneday' | 'threedays' | 'oneweek' | 'twoweeks' | 'onemonth' | 'threemonths' | 'sixmonths' | 'oneyear', nullable — PDF expiration period. `never` means PDFs never expire, `immediate` means they expire right away, and other values set the expiration window.
  - `imageOptions` object
    - `quality` integer — Image quality (1-100).
    - `maxWidth` integer — Maximum image width in pixels.

## Response `200`

Automation updated

- object
  - `message` string
  - `updatedAutomation` Automation
    - `_id` string — Automation ID.
    - `title` string
    - `dataSource` object
      - `name` string
    - `dataSourceName` string
    - `docTemplateLink` string, uri — Google Doc template URL.
    - `newDocumentNameField` string
    - `isActive` boolean
    - `saveGoogleDoc` boolean
    - `locale` string
    - `formatNumbersWithLocale` boolean
    - `pdfExpiration` string, nullable
    - `dateCreated` string, date-time
    - `lastPreviewPdf` string, uri

## Other responses

- `400` — Invalid request parameters
- `404` — Resource not found

---

[API](https://skmtc.dev/docsautomator/apis/docsautomator-api.md) · [All operations](https://skmtc.dev/docsautomator/apis/docsautomator-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/docsautomator/docsautomator-api/revisions/3ec829ff5817/schema)
