Actions28
- Conversion Actions
- Document Actions
- PDF Service Actions
- Template Actions
- Workspace Actions
Overview
The node integrates with a PDF Generator API to perform various PDF-related operations, including managing templates, generating documents from templates, converting HTML or URLs to PDFs, and processing existing PDFs (e.g., watermarking, encryption). Specifically, the Template - Get Data Fields operation retrieves the data fields defined in a selected PDF template. This is useful when you want to understand what dynamic data inputs a particular template expects before generating documents.
Common scenarios:
- Fetching the list of required data fields for a template to prepare input data accordingly.
- Validating or inspecting templates programmatically within an automation workflow.
- Dynamically adapting workflows based on template structure.
Example:
- You select a template by its ID and use this operation to get all the placeholders or data fields it requires. Then, you can map your data source to these fields for document generation.
Properties
| Name | Meaning |
|---|---|
| Template | Select the template to work with. You can choose from a list of available templates or enter the template ID directly. The template ID must be a number. |
Output
The output JSON contains the data fields associated with the specified template. These fields represent the dynamic placeholders or variables that the template uses for merging data during PDF generation.
Typical output structure (example):
{
"fieldName1": "Field description or metadata",
"fieldName2": "Field description or metadata",
...
}
This allows users to see exactly which data points are needed to populate the template correctly.
Dependencies
- Requires an API key credential for the PDF Generator API service.
- The node makes authenticated HTTP requests to the PDF Generator API base URL (default:
https://us1.pdfgeneratorapi.com/api/v4). - No additional environment variables are required beyond the API authentication setup.
Troubleshooting
Error: "Template ID must be a number"
Occurs if the template ID provided is not numeric. Ensure you enter a valid numeric template ID or select from the list.Error: "The operation 'getDataFields' is not supported for resource 'template'"
Indicates a possible misconfiguration or unsupported operation. Verify that the resource is set to "template" and operation to "getDataFields".API Authentication Errors
If the API key is missing or invalid, requests will fail. Confirm that the API key credential is configured correctly in n8n.Empty or Unexpected Output
If no data fields are returned, verify that the template ID is correct and that the template actually defines data fields.
Links and References
- PDF Generator API Documentation — Official API docs for detailed information on templates and data fields.
- n8n Documentation — For general usage of the PDF Generator API node in n8n.