Actions13
Overview
This node integrates with a PDF generation and management API, focusing on the Template resource's Update operation. It allows users to update an existing PDF template by providing a complete JSON configuration of the template. This is useful for workflows that need to programmatically modify PDF templates used for generating documents, such as updating layout, pages, data settings, or other template properties.
Practical scenarios include:
- Automating updates to invoice or report templates when branding or layout changes.
- Dynamically modifying templates based on external data or user input before generating PDFs.
- Managing multiple versions of templates in an automated document generation pipeline.
Properties
| Name | Meaning |
|---|---|
| Template | Select the template to update. You can choose from a list of existing templates or specify the template ID directly (must be a number). |
| Template Configuration JSON | The full JSON object representing the updated template configuration. This must include all required fields such as name, layout, pages array, dataSettings, and editor objects. The JSON should represent the entire template structure, not wrapped inside another object. |
Output
The output JSON contains the response from the API after updating the template. Typically, this will include details about the updated template such as its ID, name, and other metadata confirming the update was successful.
Example output structure (simplified):
{
"id": "12345",
"name": "Updated Template Name",
"tags": [],
"isDraft": false,
"layout": { ... },
"pages": [ ... ],
"dataSettings": { ... },
"editor": { ... }
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for the PDF Generator API service.
- The node makes authenticated HTTP requests to the PDF Generator API endpoint (default base URL:
https://us1.pdfgeneratorapi.com/api/v4). - The user must have appropriate permissions to update templates via the API.
Troubleshooting
- Invalid Template ID: If the template ID is missing, empty, or not a number, the node will throw an error. Ensure the template ID is correctly specified.
- Malformed JSON: The template configuration must be valid JSON and include all required fields (
name,layout,pages,dataSettings,editor). Invalid or incomplete JSON will cause the API to reject the request. - API Authentication Errors: Missing or invalid API credentials will result in authentication failures. Verify the API key credential is configured correctly.
- Unsupported Operation Error: If the operation or resource parameters are incorrect or unsupported, the node throws an error indicating the operation is not supported.
- Network Issues: Connectivity problems to the API endpoint may cause request failures. Check network access and API availability.
Links and References
- PDF Generator API Documentation — Official API docs for template management and PDF generation.
- n8n Documentation - Creating Custom Nodes — Guide on how to create and configure nodes in n8n.
- JSON Schema example for template configuration is provided in the property description for reference.