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

This node integrates with a PDF generation and management API, enabling users to perform various PDF-related operations. Specifically for the Template - Copy operation, it allows users to create a duplicate of an existing PDF template, optionally renaming the copied template.

Common scenarios where this node is beneficial include:

  • Creating variations of an existing PDF template without modifying the original.
  • Quickly duplicating templates to experiment with different layouts or data fields.
  • Managing template versions by copying and then updating the copy.

Practical example:

  • You have a contract template and want to create a customized version for a specific client. Using the copy operation, you duplicate the original template and rename it accordingly, then modify the new template as needed.

Properties

Name Meaning
Template Select the source template to copy. Can be chosen from a searchable list or specified by ID.
New Template Name Optional name for the copied template. If left empty, the original template's name is used.

Output

The output JSON contains the response from the API after copying the template. It typically includes details about the newly created template such as its ID, name, and other metadata returned by the service.

Example output structure (simplified):

{
  "id": "12345",
  "name": "Copied Template Name",
  "success": true,
  "message": "Template copied successfully"
}

No binary data is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the PDF Generator API service.
  • The node makes HTTP requests to the API endpoint (default base URL: https://us1.pdfgeneratorapi.com/api/v4).
  • Proper network access to the API service is necessary.

Troubleshooting

  • Error: Template ID must be a number
    Occurs if the provided template ID is not numeric. Ensure the template ID input matches the expected format (digits only).

  • API authentication errors
    Verify that the API key credential is correctly configured and has sufficient permissions.

  • Network or connectivity issues
    Confirm that the n8n instance can reach the API endpoint URL.

  • Empty or invalid new template name
    While optional, if provided, ensure the new template name is a valid string.

If the operation is not supported or parameters are missing, the node throws descriptive errors indicating the issue and the item index in batch executions.

Links and References

Discussion