Actions80
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Image Watermark To Image
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- Add Text Watermark To Image
- AI-Invoice Parser
- AI-Process Contract
- AI-Process HealthCard
- Classify Document
- Compress Image
- Compress PDF
- Convert HTML To PDF
- Convert Image Format
- Convert JSON To Excel
- Convert Markdown To PDF
- Convert PDF To Editable PDF Using OCR
- Convert PDF To Excel
- Convert PDF To PowerPoint
- Convert PDF To Word
- Convert To PDF
- Convert URL to PDF
- Convert VISIO
- Convert Word to PDF Form
- Create Images From PDF
- Create PDF/A
- Create Swiss QR Bill
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Split PDF By Barcode
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Extract Attachment From PDF
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Resources
- Extract Table From PDF
- Extract Text By Expression
- Extract Text From Word
- Fill PDF Form
- Find And Replace Text
- Flip Image
- Flatten PDF
- Generate Barcode
- Generate Document Single
- Generate Documents Multiple
- Get Document From Pdf4me
- Get Image Metadata
- Get PDF Metadata
- Split PDF By Swiss QR
- Get Tracking Changes In Word
- Image Extract Text
- Linearize PDF
- Merge Multiple PDFs
- Overlay PDFs
- Parse Document
- Protect PDF
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Remove EXIF Tags From Image
- Repair PDF Document
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Document
- Rotate Image
- Rotate Image By EXIF Data
- Rotate PDF Page
- Sign PDF
- Split PDF By Text
- Split PDF Regular
- Unlock PDF
- Update Hyperlinks Annotation
- Upload File To PDF4me
Overview
The node operation Generate Documents Multiple allows users to generate multiple documents based on a template and corresponding data inputs. It supports various ways to provide the template file (binary, base64 string, raw HTML code, or URL) and document data (text input, binary data, base64 string, or URL). This flexibility enables batch generation of documents such as reports, invoices, contracts, or letters by merging structured data with predefined templates.
Typical use cases include:
- Generating personalized documents for multiple recipients using JSON or XML data.
- Automating report creation from dynamic data sources.
- Creating multiple contract documents from a single template and different datasets.
- Producing bulk PDF or Word documents in workflows that require templated output.
Properties
| Name | Meaning |
|---|---|
| Template File Input Type | How to provide the template file. Options: Binary Data (from previous node), Base64 String, HTML Code (manual raw HTML, only for HTML template type), 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 (used if Template File Input Type is Binary Data). |
| Template Base64 Content | Base64 encoded content of the template file (used if Template File Input Type is Base64). |
| Template File Name (required) | Name of the template file including extension (required if Template File Input Type is Base64, URL, or HTML Code). |
| Template File URL | URL of the template file (used if Template File Input Type is URL). |
| HTML Code | Raw HTML template code entered manually (used if Template File Input Type is HTML Code and Template File Type is HTML). |
| Template File Type | The type of the template file. Options: Word (Docx), HTML, PDF. |
| Document Data Input Type | How to provide the document data. Options: Text (manual JSON or XML), Binary Data (from previous node), Base64 String, URL. |
| Document Data Type | The format of the document data. Options: JSON, XML. |
| Document Data Text | Manual entry of document data 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 (used if Document Data Input Type is Binary Data). |
| Document Base64 Content | Base64 encoded content of the data file (used if Document Data Input Type is Base64). |
| Document Data File Name (required) | Name of the data file including extension (required if Document Data Input Type is Base64 or URL). |
| Document Data File URL | URL of the data file (used if Document Data Input Type is URL). |
| Output File Name | Base name for the generated output files. If multiple documents are created, numbers will be appended (e.g., "document1.pdf", "document2.pdf"). |
| Binary Data Output Name | Custom name for the binary data field in the node's output. |
Output
The node outputs an array of items where each item contains a json object and a binary data field (with customizable name). The binary data represents the generated document(s) based on the provided template and data.
- The
jsonpart typically includes metadata or status information about the generated documents. - The binary data contains the actual generated document files (e.g., PDF, DOCX) ready for further processing or saving.
If multiple documents are generated, they are output as separate items with incremented filenames based on the provided output file name prefix.
Dependencies
- Requires access to the template file and document data either via binary input, base64 strings, URLs, or manual text input.
- Depends on an external document generation service or library capable of merging templates with data to produce documents (implied by the imported actions but not explicitly shown).
- May require API keys or authentication tokens configured in n8n credentials to access URLs or external services if used.
Troubleshooting
- Common issues:
- Incorrect or missing template file input leading to failure in document generation.
- Malformed JSON or XML data causing parsing errors.
- Unsupported template file types or mismatched template and data formats.
- Network issues when providing template or data files via URLs.
- Error messages:
- Errors related to invalid base64 content or missing binary properties indicate incorrect input configuration.
- Parsing errors for JSON/XML data suggest syntax problems in manual data entry.
- File not found or access denied errors when using URLs point to permission or availability issues.
- Resolutions:
- Verify the correctness and presence of all required input fields.
- Validate JSON/XML data before input.
- Ensure URLs are accessible and correct.
- Use proper file extensions matching the template and data types.
Links and References
- n8n Documentation
- General resources on document templating and generation (e.g., Docx templating libraries, PDF generation tools)
- JSON and XML formatting guides for preparing input data