Actions13
Overview
The node integrates with a PDF Generator API to manage PDF templates and perform various PDF-related operations. Specifically, for the Template resource with the Get Data Fields operation, it retrieves the data fields defined in a selected PDF template. This is useful when you want to understand or extract the dynamic fields that a template expects for document generation.
Common scenarios include:
- Automatically fetching template data fields to dynamically build forms or user interfaces that collect input data.
- Validating which fields are required before generating documents from templates.
- Integrating with other systems where you need to map data inputs to template fields programmatically.
Example: You have a contract template with placeholders for client name, date, and amount. Using this operation, you can retrieve these field names and types to prompt users to fill them before generating the final PDF.
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. This identifies which template's data fields will be retrieved. |
Output
The output JSON contains the data fields metadata of the specified template. This typically includes information about each field such as its name, type, and possibly validation rules or default values. The exact structure depends on the API response but generally provides all necessary details to understand what data the template requires.
No binary data is output by this operation.
Example output snippet (conceptual):
{
"fields": [
{
"name": "clientName",
"type": "string",
"required": true
},
{
"name": "contractDate",
"type": "date",
"required": true
}
]
}
Dependencies
- Requires an API key credential for the PDF Generator API service.
- The node uses authenticated HTTP requests to the API endpoint
https://us1.pdfgeneratorapi.com/api/v4
. - No additional environment variables are needed beyond the configured API credentials.
Troubleshooting
Error: "Template ID must be a number"
Occurs if the template ID provided does not match the expected numeric format. 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 the operation to "Get Data Fields".API Authentication Errors
If the API key is invalid or missing, requests will fail. Confirm that the API key credential is correctly configured and has sufficient permissions.Empty or Unexpected Response
If no data fields are returned, check 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 templates and data fields.
- n8n Resource Locator Documentation — Explanation of how resource locators work in n8n nodes.