PDF Generator API icon

PDF Generator API

Generate PDFs, manage templates, convert HTML/URLs to PDF, and perform PDF operations like watermarking, encryption, and optimization

Overview

The node integrates with a PDF generation and management API, providing extensive capabilities around PDF templates and documents. Specifically for the Template - 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 data placeholders that a template expects, enabling you to prepare or validate input data before generating PDFs.

Common scenarios include:

  • Fetching the list of required data fields from a template to dynamically build forms or user interfaces.
  • Validating that your input data matches the expected fields of a template.
  • Automating workflows where templates are selected and data is merged programmatically.

Example: You have a contract template with placeholders like clientName, contractDate, and amount. Using this operation, you can retrieve these field names to ensure your data source provides all necessary values before generating the final PDF.

Properties

Name Meaning
Template Select the template to work with. You can choose from a searchable list of templates or enter the template ID directly (must be numeric).

Output

The output JSON contains the data fields metadata of the specified template. This typically includes an array or object describing each data field's name, type, and possibly other attributes such as default values or validation rules.

Example output structure (simplified):

{
  "fields": [
    {
      "name": "clientName",
      "type": "string",
      "required": true
    },
    {
      "name": "contractDate",
      "type": "date",
      "required": false
    }
  ]
}

This output helps downstream nodes or processes understand what data is needed to fill the template.

Dependencies

  • Requires an API key credential for the PDF Generator API service.
  • The node makes authenticated HTTP requests to the external PDF Generator API endpoint.
  • No additional environment variables are required beyond the API credential configuration.

Troubleshooting

  • Error: "Template ID must be a number"
    Occurs if the template ID entered manually is not numeric. Ensure you provide a valid numeric 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 request failures (network errors, authentication issues)
    Check that the API key credential is correctly configured and has proper permissions. Also verify network connectivity to the API endpoint.

  • Empty or unexpected response
    Confirm the template ID exists and that the template has defined data fields. Some templates might not have any data fields configured.

Links and References


This summary focuses on the Template resource's Get Data Fields operation, describing its purpose, inputs, outputs, dependencies, and common troubleshooting tips based on static code analysis.

Discussion