Actions8
- Document Actions
- Template Actions
Document → Generate Document
AI-generatedOverview
The DocuGenerate node automates the creation of high-quality documents in various formats (e.g., .docx, .pdf, .txt) using predefined Word templates. It is useful for scenarios where users need to generate customized documents dynamically by merging template content with input data, such as generating contracts, reports, or invoices automatically.
Use Case Examples
- Generate a PDF contract by selecting a contract template and providing client data.
- Create a Word document report by merging a report template with sales data from a previous workflow node.
Properties
| Name | Meaning |
|---|---|
| Template Name or ID | Select or specify the template to use for generating the document. This is required. |
| Name | Optional name for the generated document. Defaults to the template's name if not provided. |
| Format | Output format of the generated document, such as .docx, .pdf, .txt, or .png. Defaults to .docx. |
| Data | JSON data used to populate the template fields for document generation. Defaults to data from the previous node but can be customized manually. |
| Request Options | Advanced options for request handling, including batching, SSL certificate validation, proxy settings, and request timeout. |
Output
JSON
document_id- Unique identifier of the generated document.name- Name of the generated document.format- Format of the generated document.url- URL to access or download the generated document.
Dependencies
- DocuGenerate API key credential required for authentication.
Troubleshooting
- Ensure the template ID is valid and accessible; invalid IDs will cause errors.
- Check that the data provided matches the template fields to avoid generation errors.
- If SSL issues occur, consider enabling the 'Ignore SSL Issues' option, but be aware of security risks.
- Verify proxy settings if using a proxy to avoid connection failures.
- Timeout errors may occur if the server is slow; increase the timeout setting if needed.
Links
- DocuGenerate API Documentation - Official API documentation for DocuGenerate service.
- n8n Expressions Documentation - Guide on using expressions in n8n to dynamically set property values.