Actions80
- Extract Text From Word
- Find And Replace Text
- Convert PDF To Editable PDF Using OCR
- Create Swiss QR Bill
- Split PDF By Barcode
- Split PDF By Swiss QR
- Split PDF By Text
- Split PDF Regular
- Create PDF/A
- Convert HTML To PDF
- Convert Markdown To PDF
- Upload File To PDF4me
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Fill PDF Form
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- AI-Invoice Parser
- AI-Process HealthCard
- AI-Process Contract
- Generate Barcode
- Classify Document
- Parse Document
- Linearize PDF
- Flatten PDF
- Convert To PDF
- Json To Excel
- Convert PDF To Excel
- Convert PDF To Word
- Convert PDF To PowerPoint
- Convert VISIO
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Extract Pages
- Merge Multiple PDFs
- Overlay PDFs
- Rotate Document
- Rotate Page
- Sign PDF
- URL to PDF
- Add Image Watermark To Image
- Add Text Watermark To Image
- Compress Image
- Convert Image Format
- Create Images From PDF
- Flip Image
- Get Image Metadata
- Image Extract Text
- Remove EXIF Tags From Image
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Image
- Rotate Image By EXIF Data
- Compress PDF
- Get PDF Metadata
- Repair PDF Document
- Get Document From Pdf4me
- Update Hyperlinks Annotation
- Protect Document
- Unlock PDF
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Generate Document Single
- Generate Documents Multiple
- Get Tracking Changes In Word
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Attachment From PDF
- Extract Text By Expression
- Extract Table From PDF
- Extract Resources
Overview
The node operation Generate Documents Multiple allows users to generate multiple documents based on a provided template and corresponding data sets. It supports various input methods for both the template file and the document data, including binary data from previous nodes, base64 encoded strings, or URLs. The node can handle different template file types such as Word, HTML, and PDF, and output the generated documents in formats like PDF, Word, Excel, or HTML.
This operation is beneficial in scenarios where batch document generation is required, such as creating personalized reports, invoices, contracts, or certificates for multiple recipients using a single template and varying data inputs.
Practical Examples:
- Generating customized invoices for multiple customers by providing a Word template and JSON data for each invoice.
- Creating certificates for event participants by supplying an HTML template and XML data files.
- Producing multiple PDF reports from a single PDF template and data files fetched via URLs.
Properties
| Name | Meaning |
|---|---|
| Template File Input Type | How to provide the template file. Options: Binary Data (from previous node), Base64 String (encoded content), URL (link to template file). |
| Template Binary Property | Name of the binary property containing the template file (used if Template File Input Type is Binary Data). |
| Template File Name | Name of the template file including extension (required when input type is Base64 or URL; optional for Binary Data). |
| Template Base64 Content | Base64 encoded content of the template file (required if Template File Input Type is Base64). |
| Template File URL | URL of the template file (required if Template File Input Type is URL). |
| Template File Type | Select the template file type. Options: Word (Docx), HTML, PDF. |
| Document Data Input Type | How to provide the document data. Options: Text (manual JSON or XML entry), Binary Data (from previous node), Base64 String (encoded content), URL (link to data file). |
| Document Data Type | The data format for the template data. Options: JSON, XML. |
| Document Data Text | Manual data entry for the template in JSON or XML format (required if Document Data Input Type is Text). |
| Document Binary Property | Name of the binary property containing the data file (used if Document Data Input Type is Binary Data). |
| Document Data File Name | Name of the data file including extension (optional for Binary Data; required for Base64 or URL). |
| Document Base64 Content | Base64 encoded content of the data file (required if Document Data Input Type is Base64). |
| Document Data File URL | URL of the data file (required if Document Data Input Type is URL). |
| File Meta Data | Additional metadata for fields in JSON format (optional). |
| Output Type | The file format of the generated document(s). Options: PDF, Word (Docx), Excel, HTML. |
| Meta Data Json | Metadata in JSON format (required). |
| Output File Name | Name for the output file(s). If multiple documents are generated, this will be used as a prefix with numbers appended (e.g., "document" becomes "document1.pdf", "document2.pdf", etc.). |
Output
The node outputs an array of generated documents, each represented as an item with a json field containing metadata and information about the generated document. The actual document content is typically included as binary data attached to the output item, representing the generated file in the selected output format (PDF, Word, Excel, or HTML).
If multiple documents are generated, the output includes multiple items, each corresponding to one generated document file. The output file names follow the specified prefix with numeric suffixes if applicable.
Dependencies
- Requires access to the template file and document data either through previous nodes (binary data), base64 encoded strings, or accessible URLs.
- The node depends on an external document generation service or library capable of processing templates and data to produce the output documents.
- Proper API authentication credentials or tokens must be configured in n8n to enable communication with the external document generation service.
- Network access is necessary if URLs are used to fetch template or data files.
Troubleshooting
Common Issues:
- Incorrect or missing template or data file inputs leading to errors in document generation.
- Malformed JSON or XML data causing parsing failures.
- Unsupported template or output file types.
- Network issues when fetching files from URLs.
- Missing or invalid metadata JSON.
Error Messages and Resolutions:
- "Template file not found or inaccessible": Verify the binary property name, base64 content, or URL correctness and accessibility.
- "Invalid JSON/XML data": Check the syntax and structure of the manual data entry or data files.
- "Unsupported file type": Ensure the selected template and output file types are supported.
- "Authentication failed": Confirm that the API key or authentication token is correctly set up in n8n credentials.
- "Network error while fetching file": Check network connectivity and URL validity.