---
canonical_url: "https://docs.composio.dev/toolkits/docsautomator_mcp"
markdown_url: "https://docs.composio.dev/toolkits/docsautomator_mcp.md"
product: "platform"
version: null
last_updated: null
---

# DocsAutomator MCP

Build document automations, design templates, generate PDFs and manage e-signatures through DocsAutomator's hosted MCP server.

- **Category:** model context protocol
- **Auth:** DCR_OAUTH
- **Composio-managed OAuth available?** No
- **Tools:** 22
- **Triggers:** 0
- **Slug:** `DOCSAUTOMATOR_MCP`
- **Version:** 00000000_00

## Tools

### Cancel esign session

**Slug:** `DOCSAUTOMATOR_MCP_CANCEL_ESIGN_SESSION`

Cancel an open signing or acceptance session: its links stop working. A completed one cannot be cancelled.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `reason` | string | No |  |
| `sessionId` | string | Yes |  |

### Configure automation

**Slug:** `DOCSAUTOMATOR_MCP_CONFIGURE_AUTOMATION`

Change an automation's settings. status: 'test' = free watermarked documents; 'live' = real, counted against the quota; 'inactive' pauses triggers; 'trash' stops it at once (restorable in the app's Trash). locale sets how values print and follows the chat's language, not location or currency; a setting, not a limit. description tells AI clients its purpose. documentNameField: source field naming each file. eInvoiceAddon and seller are workspace-wide (owners, admins). Record sources only: airtableTrigger or notionTrigger fire on a field value; sheetsAutoPolling polls Google Sheets every ~5 minutes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `title` | string | No |  |
| `locale` | string | No |  |
| `qrBill` | object | No | Only this automation's QR-bill seller: { seller: { name&#124;street&#124;postcode&#124;city&#124;country&#124;iban&#124;qrIban: ref as in eInvoice } }; unset keys use Settings |
| `seller` | object | No | Workspace e-invoice seller; sent keys change: name, tradingName, street, addressLine2, postcode, city, country (2 letters), vatId, taxNumber, registrationId, contactName, contactPhone, contactEmail, iban, bic, accountName |
| `status` | string ("live" | "test" | "inactive" | "trash") | No |  |
| `approval` | object | No |  |
| `eInvoice` | object | No | This automation's e-invoice: { enabled, format: zugferd&#124;xrechnung, documentType: 380 (invoice)&#124;381 (credit note), vatTreatment: standard&#124;reverse_charge_de&#124;reverse_charge_eu&#124;intra_eu_goods&#124;small_business, fields: { <key>: ref } (prepaidAmount = amount already paid; documentType, vatTreatment = per record, the setting applies when empty; allowanceAmount or allowancePercent = a whole-invoice discount, with allowanceReason and allowanceVatRate), seller: { <seller key>: ref } (this automation only; unset keys use the workspace seller), lineItems: { source: line_items_N, columns: { <key>: {placeholder}&#124;{fieldId} } } }; ref = {placeholder}&#124;{fieldId}&#124;{value} |
| `timeZone` | string | No |  |
| `dateFormat` | object | No |  |
| `description` | string | No |  |
| `automationId` | string | Yes |  |
| `eInvoiceAddon` | boolean | No | E-invoice add-on on or off, for the whole workspace |
| `notionTrigger` | object | No |  |
| `testRecipient` | string | No | Member email who gets its tests; '' = whoever runs it. |
| `airtableTrigger` | object | No |  |
| `documentNameField` | string | No |  |
| `sheetsAutoPolling` | object | No |  |
| `formatNumbersWithLocale` | boolean | No |  |

### Configure esignature

**Slug:** `DOCSAUTOMATOR_MCP_CONFIGURE_ESIGNATURE`

Set up signing or acceptance. closeType 'acceptance': the recipient opens a link and taps Accept, no {{esign.*}} tags. 'signature': drawn or typed at {{esign.signature_N}} tags, one signer per index. On API, MCP and no-source automations, signers use emailSource 'request': create_document recipients name the person per send. Record sources, Zapier, Make, n8n, Glide and Noloco have no 'request'; signers come from the record's email field or a placeholder that exists in the template.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sender` | object | No | Who the signing emails come FROM (the Signing & Acceptance panel, Settings tab). |
| `enabled` | boolean | No | Switch signing on or off. false keeps the signers and tags. |
| `signers` | array | No |  |
| `closeType` | string ("signature" | "acceptance") | No | Default 'signature' (see the tool description). Signers are kept when switching. |
| `reminders` | object | No |  |
| `driveFolder` | string | No | After signing: Drive folder id or URL for the signed PDF. '' clears it. |
| `automationId` | string | Yes |  |
| `fieldConfigs` | object | No | Per e-sign tag, without 'esign.': displayName, helpText, required (default true). Merges per tag; null removes its settings. |
| `signingOrder` | string ("parallel" | "sequential") | No | parallel = everyone at once; sequential = one after another |
| `deliveryMethod` | string ("email" | "manual") | No | 'email': DocsAutomator emails each signer. 'manual': you hand out the links. |
| `emailTemplates` | object | No | Email copy for EVERY future request. Variables: {{documentName}}, {{signerName}}, {{signerEmail}}, {{expirationDate}}, data placeholders. Invitation and reminder bodies need {{signButton:text}} or {{signLink:text}}; completion can use {{downloadButton:text}}. |
| `expirationDays` | number | No | Days a signing request stays valid before it expires. |
| `signedPdfField` | string | No | Record field (name or id) for the signed PDF: Airtable attachment, Notion Files, SmartSuite file, Sheets column (link), ClickUp 'enabled'. '' turns it off. Not on API, Zapier, Glide, Noloco. Unsigned PDF: configure_output writeBackPdfField. |
| `brandingLogoUrl` | string | No | Signing-page logo: a public https image URL; null restores the default. |
| `completionEmail` | object | No |  |
| `emailDateFormat` | string | No | Date format used in signing emails, e.g. 'MM/DD/YYYY' or 'DD.MM.YYYY' |
| `signingLanguage` | string ("en" | "de" | "es" | "fi" | "fr" | "pt" | "he" | "nl" | "it") | No | Language of the signing page and its emails. |
| `dropboxFolderPath` | string | No | e.g. '/Contracts/Signed'; '' = root. |
| `fieldValueMappings` | object | No | E-sign tag (without 'esign.') -> field (name or id) for what the signer typed or ticked. '' removes one. Signatures are not written back. |
| `dropboxAccountEmail` | string | No | Needed only with several Dropbox accounts. |
| `saveSignedPdfToDrive` | boolean | No | Also save the signed PDF to Google Drive; needs driveFolder. |
| `acceptanceRequireName` | boolean | No | Acceptance only: the recipient types their name before accepting. |
| `saveSignedPdfToDropbox` | boolean | No | AFTER SIGNING: also save the signed pdf to Dropbox. |
| `hubspotStageAfterSigning` | string | No | HubSpot stage after closing; '' keeps it |

### Configure line items

**Slug:** `DOCSAUTOMATOR_MCP_CONFIGURE_LINE_ITEMS`

Set how one line-item group (the N in {{line_items_N}}) is presented: grouping under header rows, sorting by a column (a refusal says where the order is set instead), auto-number column, page breaks or keep-together, skipRecords rules that leave records out. Blocks left out stay as they are. The linked table feeding the rows is set_data_source's lineItems.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sorting` | object | No |  |
| `grouping` | object | No |  |
| `lineItem` | string | Yes | line-item index as a string, e.g. "1" for {{line_items_1}} |
| `autoNumber` | object | No |  |
| `skipRecords` | object | No |  |
| `automationId` | string | Yes |  |
| `keepSectionOnOnePage` | boolean | No | Repeating sections only: true keeps each section on one page if it fits; false turns it off. |
| `pageBreakBetweenSections` | boolean | No | Repeating sections only: true puts each record on a new page; false turns it off. |

### Configure output

**Slug:** `DOCSAUTOMATOR_MCP_CONFIGURE_OUTPUT`

Set what happens with each generated document. Blocks left out stay as they are. email: sender 'gmail' or 'outlook' from a connected account (Business plan and up). pdf: link expiry, Drive folder. word.save makes create_document return wordFileUrl. writeBackPdfField uploads the generated, UNSIGNED PDF to a record field; the signed PDF is configure_esignature's signedPdfField. Folders: an id or a Drive URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `pdf` | object | No |  |
| `word` | object | No |  |
| `email` | object | No |  |
| `dropbox` | object | No |  |
| `webhook` | object | No |  |
| `oneDrive` | object | No |  |
| `googleDoc` | object | No |  |
| `mergePdfs` | object | No |  |
| `automationId` | string | Yes |  |
| `documentsFolder` | string | No | Documents-page folder for new documents, created if missing; '' stops filing. |
| `writeBackPdfField` | string | No | attachment field/column to save the generated PDF into |
| `writeBackWordField` | string | No | Attachment field for the generated Word file. |
| `writeBackPdfUrlField` | string | No | Text or URL field for the generated PDF's URL (Airtable, Notion) |
| `overwritePdfAttachment` | boolean | No | true replaces the record's PDF each run (earlier ones are lost); false (default) adds a file. |
| `overwriteWordAttachment` | boolean | No | Same replace-or-add choice for the Word (.docx) attachment. |
| `writeBackDrivePdfUrlField` | string | No | Text or URL field for the Google Drive PDF's link; needs pdf.saveToDrive. |
| `writeBackGoogleDocUrlField` | string | No | Text or URL field for the Google Doc's link; needs googleDoc.save. |

### Configure placeholders

**Slug:** `DOCSAUTOMATOR_MCP_CONFIGURE_PLACEHOLDERS`

Store what each placeholder means and how it prints. descriptions: meaning plus print format, e.g. "Subtotal before tax, net, in EUR; prints as €1,234.56"; examples use sample values 1234.56 and 2026-12-31, not values from a request. formats: one per amount, number or date (currency with ISO code; percent multiplies by 100), paired with the locale (configure_automation). options: deleteWhenEmpty removes an empty placeholder's paragraph or table row. conditions: show or hide {{section_NAME}} blocks and placeholders by raw values, hide values, render Markdown. No new template needed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `formats` | array | No |  |
| `options` | object | No |  |
| `conditions` | object | No |  |
| `automationId` | string | Yes |  |
| `descriptions` | object | No | placeholder name -> description ("" or null removes it) |

### Create automation

**Slug:** `DOCSAUTOMATOR_MCP_CREATE_AUTOMATION`

Create an automation. docTemplateLink links the user's Google Doc; set_template adds an upload or gallery template; generate_word_template designs a new Word template. fromAutomationId copies that automation's template and signing setup, on API with no trigger; copySettings true copies the whole automation, with data source, triggers and mappings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `title` | string | Yes | Name for the automation |
| `copySettings` | boolean | No | With fromAutomationId: copy every setting, not only the template |
| `dataSourceName` | string ("Airtable" | "Glide" | "API" | "Zapier" | "Noloco" | "ClickUp" | "SmartSuite" | "Google Sheets" | "n8n" | "Make" | "HubSpot") | No | The data source type |
| `docTemplateLink` | string | No | URL of the user's existing Google Doc template. |
| `fromAutomationId` | string | No | Copy this automation's template; no dataSourceName needed. |

### Create document

**Slug:** `DOCSAUTOMATOR_MCP_CREATE_DOCUMENT`

Generate a document from an automation. Values are raw: numbers as numbers, dates as ISO dates; get_automation lists placeholders and formats. A placeholder without a format prints the value exactly as sent, so an amount there keeps its currency only as text, e.g. "750 EUR". With signing or acceptance on, a session starts with the document; recipients [{ signer, email, name }] names the signers on 'Given with each request'. With recId on a record source, the record's mapped email fields name them and recipients replaces them for this document. Returns pdfUrl, or a jobId for get_recent_runs. Side effect: on a record-source automation (recId or rowNumber) with write-back fields or attachment overwrite configured (configure_output), the generated PDF, Word file or URLs are written back into that existing source record and can replace its attachments.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | No | Placeholder values (API data source). A placeholder left out prints empty. Line items as arrays; nested rows (up to 2 levels) in each item's "children". |
| `mode` | string ("test" | "live") | Yes | 'test': runs everything, every email goes to the test recipient, watermarked, free. 'live': real and counted; refused while the automation is in Test or before its first test document. |
| `async` | boolean | No | true: jobId at once |
| `email` | object | No | The signing email. account: a connected Gmail or Outlook address. body needs {{signButton:text}}. |
| `recId` | string | No | Record ID of the source record |
| `fields` | array | No | PDF: [{signer,type:signature&#124;initials&#124;date,anchor&#124;page,x,y}] |
| `language` | string ("en" | "de" | "es" | "fi" | "fr" | "pt" | "he" | "nl" | "it") | No |  |
| `rowNumber` | number | No | Row number for Google Sheets data source |
| `skipEsign` | boolean | No | true: no signing or acceptance session, e.g. a draft for review. |
| `recipients` | array | No | Who signs or accepts, this document only; adds no signer. Required for signers on 'Given with each request', also with recId. |
| `templateId` | string | No | Sign a template, no automation (search my_templates); takes email, language; result says reminders |
| `automationId` | string | No | The automation/document ID to use |
| `documentName` | string | No | Custom name for the generated document |
| `webhookParams` | object | No | Strings sent back in this run's webhooks |
| `approverEmails` | array | No | Business plan and up. Approvers for this document only. |
| `idempotencyKey` | string | No | Same key within 7 days: returns the first result, creates nothing. |

### Edit word template

**Slug:** `DOCSAUTOMATOR_MCP_EDIT_WORD_TEMPLATE`

Change an automation's existing Word template with one natural-language instruction: styling, layout, text, adding, renaming or hard-coding placeholders. One section or concern per call; bigger changes take several calls. The result lists the placeholders after the edit: a changed tag still listed means the edit did not take. embedImageUrl embeds an image (e.g. a logo). A website URL in the instruction: its colours and logo are read. Text in nested tables is edited like other text; only their rows and columns are fixed. The user can also use Edit Template in the app.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tintColor` | string | No | Optional 6-digit hex, e.g. "#b7410e": tints the embedded image (duotone, transparency kept). No other image effects. |
| `instruction` | string | Yes | The edit, in natural language. Max 2,000 characters (about 300 words). |
| `automationId` | string | Yes |  |
| `embedImageUrl` | string | No | Public PNG, JPG, GIF, WebP or SVG image URL to embed, e.g. generate_word_template's logoUrl. SVG and WebP become PNG. |

### Generate word template

**Slug:** `DOCSAUTOMATOR_MCP_GENERATE_WORD_TEMPLATE`

Design a new Word (.docx) template for an automation with the AI designer (about a minute). The prompt gives STRUCTURE (sections, {{placeholder}} names, line-item tables, tone) in under 5,000 characters; longer content goes in through edit_word_template, which also changes an existing Word file, including the user's own. A timed-out prompt times out again unchanged.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `look` | string ("restrained" | "branded") | No | restrained: the style's own accent; branded: the brand colour as accent (needs customColors). Omit to infer. |
| `facts` | object | No | Business phone, email, website, address and terms as the user typed them; omit the rest. |
| `title` | string | Yes | Template title, e.g. "Customer Invoice" |
| `prompt` | string | Yes | What to design: sections, {{placeholders}}, tables, tone; under 5,000 characters. |
| `logoUrl` | string | No | Public PNG, JPG, GIF, WebP or SVG logo URL to embed; SVG and WebP are converted to PNG. |
| `signingMode` | string ("docsautomator" | "acceptance" | "external" | "none") | No | Required when the document has signature, initial, date or checkbox fields. 'docsautomator': signed through DocsAutomator ({{esign.*}} tags). 'acceptance': the customer accepts online through DocsAutomator; nothing is signed and no signature lines appear. 'external': the user's own tool signs; no {{esign.*}} tags, use ☐ and blank lines. 'none': nothing to sign or accept. The value is the user's answer. |
| `stylePreset` | string | No | A different look: ledger, counsel, studio, letter or certificate. Without it the designer picks. |
| `automationId` | string | Yes | The automation id (24-char hex) |
| `brandWebsite` | string | No | The user's website: its brand colours and logo are used; customColors and logoUrl override them |
| `customColors` | object | No | Brand colors (hex) |
| `replaceUserFile` | boolean | No | true: a new design replaces the user's own uploaded Word file. |
| `oneDocumentBrand` | boolean | No | true: the user named other colours for this one document, so customColors apply to it. Without it, a saved workspace brand replaces customColors. |
| `placeholderDescriptions` | object | No | Placeholder name (no braces) -> what it is and how it prints, e.g. "Subtotal, net, EUR; prints as €1,234.56". Examples use 1234.56 and 2026-12-31, not request values. Change later with configure_placeholders. |

### Get automation

**Slug:** `DOCSAUTOMATOR_MCP_GET_AUTOMATION`

One automation: template (type, placeholders with meaning and print format, locale, sections, signers, warnings), data source, mappings, line items, conditions, output, signing. include 'generationSetup': the exact steps to trigger it from its data source (scripts, webhook URL, headers) and how each platform picks it: by name in Softr, Zapier, Make, n8n and Noloco, by pasted id only in Glide and API requests. include 'templateText': a Google Doc or Word template's text (not PDF). canGoLive: whether it can go live, and if not, why.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `include` | array | No | Extra parts to return |
| `automationId` | string | Yes | The automation id |

### Get data source

**Slug:** `DOCSAUTOMATOR_MCP_GET_DATA_SOURCE`

A connected record source's tables and fields, for set_data_source. Values sent with create_document need no data source. airtable: no ids lists bases; baseId lists tables with fields (large base: add tableId). notion: no ids lists databases; dataSourceId (the dataSources[].id, not the database id) lists properties. google_sheets: no ids lists recent sheets. google_forms needs formId. smartsuite (workspace slug first) and clickup step down by id. search with a table's ids returns up to 5 records, id and name only. An unconnected account answers with a link to connect it in the app.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `baseId` | string | No |  |
| `formId` | string | No | Google Form FILE id; lists its questions |
| `listId` | string | No | ClickUp list id |
| `search` | string | No |  |
| `source` | string ("airtable" | "notion" | "google_sheets" | "google_forms" | "smartsuite" | "clickup" | "api" | "hubspot") | Yes |  |
| `spaceId` | string | No | ClickUp space id |
| `tableId` | string | No |  |
| `objectType` | string | No | HubSpot record type |
| `solutionId` | string | No |  |
| `dataSourceId` | string | No | Notion data source id |
| `spreadsheetId` | string | No | Google spreadsheet id (from its URL) |
| `smartSuiteWorkspaceId` | string | No |  |

### Get profile

**Slug:** `DOCSAUTOMATOR_MCP_GET_PROFILE`

The connected workspace (id, name, account email) and plan: documents used and included this period, overage cap (most documents with overage on), period end. Trials make unlimited test documents.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes |  |
| `name` | string | No |  |
| `plan` | object | No |  |
| `email` | string | No |  |
| `pricing` | object | No |  |

### Get recent runs

**Slug:** `DOCSAUTOMATOR_MCP_GET_RECENT_RUNS`

Recent document runs, with failures' real error messages, for 'generation failed' questions. successfulRequests: runs that worked (testMode true = watermarked test run). failedRequests names the failing record. includeData adds run values. jobId follows one queued document instead; waitSeconds waits for it.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `jobId` | string | No | jobId from an async create_document |
| `limit` | number | No |  |
| `onlyFailed` | boolean | No | Only runs containing failures |
| `includeData` | boolean | No | Also return each API or chat run's values (kept 90 days), e.g. to make the document again with changes |
| `waitSeconds` | number | No | Seconds to wait for the job to finish (max 120) |
| `automationId` | string | No | Limit to one automation |

### List automations

**Slug:** `DOCSAUTOMATOR_MCP_LIST_AUTOMATIONS`

List the workspace's automations: id, title, data source, status, templateType and description (what each one is for). 25 per page: total counts matches, nextOffset gives the next page; search filters by title.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | number | No | Automations per page, 1 to 100 (default 25) |
| `offset` | number | No | How many matching automations to skip (default 0) |
| `search` | string | No | Only automations whose title contains this text (case-insensitive) |

### List esign sessions

**Slug:** `DOCSAUTOMATOR_MCP_LIST_ESIGN_SESSIONS`

Signing and acceptance sessions with a count per status. Open (waiting) and 'awaiting_approval' (not sent yet) first, then the rest, newest first in each. waitingOn: who has not signed or accepted, with their reminders. sessionId: one session in full with signing links and signedPdfUrl; include 'audit' adds its audit trail.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number for pagination |
| `email` | string | No | Filter by signer email (partial match) |
| `limit` | integer | No | Results per page (max 100) |
| `status` | string ("open" | "pending" | "in_progress" | "completed" | "declined" | "expired" | "cancelled") | No | Filter by session status |
| `include` | array | No |  |
| `sessionId` | string | No | One session in full |
| `automationId` | string | No | Only sessions of this automation |

### Resend esign invite

**Slug:** `DOCSAUTOMATOR_MCP_RESEND_ESIGN_INVITE`

Resend the signing or acceptance invitation to one signer, e.g. when they lost it. signerIndex: from list_esign_sessions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sessionId` | string | Yes |  |
| `signerIndex` | number | Yes | 1-based |

### Search

**Slug:** `DOCSAUTOMATOR_MCP_SEARCH`

Search DocsAutomator's help docs (in 'docs', the default) or template gallery (in 'templates'). Docs answer how-to, feature, integration, syntax, troubleshooting and pricing questions. A gallery result with hasWordVersion applies via set_template's galleryTemplateId.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `in` | string ("docs" | "templates" | "my_templates") | No | Default: docs |
| `query` | string | Yes | Search terms, e.g. "nested line items" or "invoice" |

### Send esign reminder

**Slug:** `DOCSAUTOMATOR_MCP_SEND_ESIGN_REMINDER`

Email a reminder to one signer who has not signed or accepted yet. signerIndex: from list_esign_sessions waitingOn. The session's reminder limit applies.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sessionId` | string | Yes |  |
| `signerIndex` | number | Yes | 1-based |

### Set data source

**Slug:** `DOCSAUTOMATOR_MCP_SET_DATA_SOURCE`

Connect a record source to an automation and map its placeholders to fields in one call. source takes its block (ids from get_data_source); 'api' switches to data sent with each request and clears record mappings. Line items: the block's lineItems (a linked table or sheet). mappings: placeholder name (no braces) → Airtable field id, Notion property id, Sheets column header, SmartSuite slug, ClickUp field id or Forms questionId (names also resolve); 'Link.Field' drills through Airtable links and Notion relations. Mappings merge unless replace is true. A new source applies to every later document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `notion` | object | No |  |
| `source` | string ("airtable" | "notion" | "google_sheets" | "google_forms" | "smartsuite" | "clickup" | "api" | "hubspot") | No |  |
| `clickup` | object | No |  |
| `hubspot` | object | No |  |
| `replace` | boolean | No | true = replace all existing mappings |
| `airtable` | object | No |  |
| `mappings` | object | No |  |
| `smartsuite` | object | No |  |
| `googleForms` | object | No |  |
| `automationId` | string | Yes |  |
| `googleSheets` | object | No |  |
| `allowDuplicateFields` | boolean | No | true: several placeholders may use one field (after a duplicate-target rejection). |

### Set template

**Slug:** `DOCSAUTOMATOR_MCP_SET_TEMPLATE`

Replace an automation's template with one of: googleDocUrl (an existing Google Doc), galleryTemplateId (from search in 'templates'), file (attached), fileUrl (a link the user shared), or fileBase64 (exact bytes from a tool, e.g. code reading the attachment; a re-typed file arrives damaged). .docx or PDF, max 25 MB; PDF overlays survive re-upload. Without these, the user uploads it at app.docsautomator.co/automations/<automationId>. New design: generate_word_template. Returns the placeholders.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | No | A .docx or .pdf file the user attached |
| `fileUrl` | string | No | https link to a .docx or .pdf |
| `fileName` | string | No | File name, e.g. contract.docx |
| `fileBase64` | string | No | A .docx or .pdf file, base64-encoded (data: URL prefix allowed) |
| `officeFile` | string ("convert" | "word") | No | The user's choice after an OFFICE_FILE result |
| `automationId` | string | Yes | The automation id |
| `googleDocUrl` | string | No | Google Doc URL or id |
| `galleryTemplateId` | string | No | Gallery template id |

### Undo template edit

**Slug:** `DOCSAUTOMATOR_MCP_UNDO_TEMPLATE_EDIT`

Revert the last AI change to an automation's Word template, up to 5 steps back.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `automationId` | string | Yes | The automation id |
