# Docugenerate

DocuGenerate simplifies document generation by converting Word templates and JSON data into professional PDF files with ease. It supports automation of contracts, invoices, letters, certificates, and more, catering to both developers and non-developers. With an intuitive REST API and no-code integrations, it ensures seamless functionality for any scale.

- **Category:** documents
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 11
- **Triggers:** 0
- **Slug:** `DOCUGENERATE`
- **Version:** 20260312_00

## Tools

### Delete Document

**Slug:** `DOCUGENERATE_DELETE_DOCUMENT`

Tool to delete a document by ID. Permanently removes the document from storage. Use when you need to clean up generated documents or remove outdated files from DocuGenerate.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier of the document to delete. Obtain this from the document generation response or by listing documents. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete template

**Slug:** `DOCUGENERATE_DELETE_TEMPLATE`

Tool to permanently delete a template by ID. Removes the template and all associated versions from storage. Use when a template is no longer needed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | ID of the template to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate documents from template

**Slug:** `DOCUGENERATE_DOCUMENT_GENERATE`

Tool to generate document(s) from a template by merging JSON data or uploading a data file. Use when you need to programmatically produce one or more documents and receive metadata including a download URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | No | Merge data as an object (single document) or list of objects for multiple documents |
| `file` | object | No | Binary file (CSV/Excel/TSV) for bulk merge when `data` is not provided |
| `name` | string | No | Logical document name; supports merge tags when generating a single document |
| `attach` | string | No | PDF URL(s) or Base64 data URIs to embed as attachments in the PDF |
| `merge_with` | string | No | PDF URL(s) or Base64 data URIs to append after generated content. Ignored if invalid or unreachable. Only for PDF/PDF-A formats. |
| `page_break` | boolean | No | Insert a page break between combined documents when `single_file` is true |
| `output_name` | string | No | Output file name without extension; extension added automatically |
| `single_file` | boolean | No | Combine multiple documents into one file (true) or return a ZIP (false) |
| `template_id` | string | Yes | ID of the template to use |
| `output_format` | string (".docx" | ".pdf" | ".doc" | ".odt" | ".txt" | ".pdf/a-1b" | ".pdf/a-2b" | ".pdf/a-3b") | No | Output format; defaults to .docx. PDF/A variants supported |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Document

**Slug:** `DOCUGENERATE_DOCUMENT_UPDATE`

Update a document's name/title in DocuGenerate. Use this to rename an existing document after it has been generated. Requires a valid document ID (obtained from document generation or listing) and the new name. Returns the updated document metadata including the document_uri for downloading.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier of the document to update. Obtain this from the document generation response or by listing documents. |
| `name` | string | Yes | The new name/title for the document. This updates the document's display name (not the filename). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get document by ID

**Slug:** `DOCUGENERATE_GET_DOCUMENT`

Tool to retrieve a specific document by ID. Returns document metadata including name, format, template_id, and download URL. Use when you need to fetch details about an existing generated document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | ID of the document to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get template by ID

**Slug:** `DOCUGENERATE_GET_TEMPLATE`

Tool to retrieve a specific template by ID. Returns template metadata including name, format, region, and configuration settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | ID of the template to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List documents by template

**Slug:** `DOCUGENERATE_LIST_DOCUMENTS`

Tool to list all documents generated from a template. Results are ordered by created time in descending order. Use when you need to retrieve a list of previously generated documents for a specific template.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `template_id` | string | Yes | ID of the template that was used to generate the documents |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get or list templates

**Slug:** `DOCUGENERATE_TEMPLATE_GET_OR_LIST`

Tool to retrieve or list existing templates. Use when needing template IDs and metadata before making updates or generating documents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | Page number to retrieve (starting at 1) |
| `per_page` | integer | No | Number of templates per page |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Template

**Slug:** `DOCUGENERATE_TEMPLATE_UPDATE`

Tool to update a template’s file and settings. Use after confirming the template ID and desired inputs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Template identifier to update |
| `file` | object | No | The template file to upload (form field 'file') |
| `name` | string | No | Optional new name for the template |
| `region` | string | No | Processing region for the template (e.g., 'us', 'eu', 'uk', 'au') |
| `versioning_enabled` | boolean | No | Enable version history for the template |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
