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 Generator API to manage PDF templates. Specifically, the Template - List operation retrieves a list of available PDF templates from the service. This is useful when you want to browse or select from existing templates for generating PDF documents in your workflows.

Common scenarios include:

  • Displaying all accessible PDF templates for selection in a document generation process.
  • Filtering templates by access type (e.g., organization-wide or private), name, or tags.
  • Paginating through large sets of templates to efficiently handle many entries.

Example use case:

  • An automation that generates invoices using predefined templates can first list all templates to allow dynamic selection based on client or project.

Properties

Name Meaning
Access Type Filter templates by access type. Options: All, Organization, Private
Name Filter Filter templates by matching template names (string search)
Page Page number to return for pagination
Per Page Number of records per page to return (max 100)
Tags Filter Filter templates by tags (comma-separated string or tag identifiers)

Output

The output is a JSON array where each item represents a template object returned by the API. Each template typically includes details such as its ID, name, tags, and access level.

The structure looks like this (simplified example):

[
  {
    "id": 12345,
    "name": "Invoice Template",
    "tags": ["invoice", "finance"],
    "access": "organization",
    ...
  },
  {
    "id": 67890,
    "name": "Report Template",
    "tags": ["report", "summary"],
    "access": "private",
    ...
  }
]

No binary data is output for this operation; it purely returns JSON metadata about templates.

Dependencies

  • Requires an API key credential for the PDF Generator API service.
  • The node makes authenticated HTTP GET requests to the /templates endpoint of the API.
  • Pagination and filtering parameters are passed as query string parameters.

Troubleshooting

  • Empty results: Ensure filters (name, tags, access) are correct and that the API key has permission to view those templates.
  • API authentication errors: Verify the API key credential is valid and correctly configured in n8n.
  • Invalid parameter values: For example, page and per_page must be positive integers; exceeding max per_page (100) may cause errors.
  • Network issues: Check connectivity to the API base URL (https://us1.pdfgeneratorapi.com/api/v4 by default).

If the node throws an error indicating unsupported operation or resource, confirm that the Resource is set to "Template" and Operation to "List".

Links and References

Discussion