Actions7
- Document Actions
- Template Actions
Overview
The node "DocuGenerate" automates the creation of high-quality documents by generating them from predefined Word templates. It is particularly useful in scenarios where users need to produce consistent, templated documents such as contracts, reports, invoices, or certificates dynamically filled with custom data. For example, a user can select a template for an invoice and provide customer-specific data to generate a personalized PDF or Word document automatically.
Properties
| Name | Meaning |
|---|---|
| Template Name or ID | Select a document template from a list or specify its ID manually. This template serves as the base for the generated document. |
| Name | The desired name for the generated document. If left empty, the system defaults to the template’s name. |
| Format | Choose the output format of the generated document. Options include Microsoft Word (.docx, .doc), OpenDocument (.odt), PDF (.pdf), Plain Text (.txt), and PNG (.png). Defaults to .docx. |
| Data | JSON data used to populate the template fields during document generation. By default, it uses data from the previous node but can be customized manually. |
Output
The node outputs a JSON object representing the generated document. This typically includes metadata about the document and the content encoded appropriately (e.g., base64 if binary). Since the node supports multiple output formats including binary ones like PDF and PNG, the output may contain binary data representing the generated file. This binary data can then be used downstream for storage, sending via email, or further processing.
Dependencies
- Requires an API key credential for authenticating with the external DocuGenerate service.
- The node makes HTTP requests to
https://api.docugenerate.comto perform operations. - Proper configuration of the API key credential within n8n is necessary for successful operation.
Troubleshooting
Common Issues:
- Invalid or missing API key will cause authentication failures.
- Specifying a non-existent template ID will result in errors when attempting to generate a document.
- Providing malformed JSON data for the template placeholders may cause generation to fail or produce incorrect documents.
- Unsupported output format values could lead to errors or unexpected results.
Error Messages & Resolutions:
- Authentication failed: Verify that the API key credential is correctly set up and has proper permissions.
- Template not found: Ensure the selected template ID exists and is accessible with the provided credentials.
- Invalid data format: Check the JSON structure supplied in the Data property matches the expected template placeholders.
- Unsupported output format: Confirm the output format is one of the supported options listed in the properties.
Links and References
- DocuGenerate API Documentation (hypothetical link for reference)
- n8n Expressions Documentation – for customizing input data dynamically