Pdforge icon

Pdforge

Generate PDF or PNG with pdforge

Overview

This node integrates with the Pdforge API to generate PDF or image files based on predefined templates. Specifically, the "Generate Asynchronously" operation under the "Generate Image" resource allows users to request image generation from a selected template and receive the rendered file asynchronously via a webhook URL.

Common scenarios for this node include:

  • Automating the creation of customized images (e.g., certificates, badges, promotional graphics) using dynamic data.
  • Generating images in bulk where immediate output is not required, and results can be processed once ready via webhook callbacks.
  • Integrating image generation into workflows that require asynchronous processing to avoid blocking execution.

For example, a marketing team could use this node to generate personalized event invitations by selecting a template and providing user-specific variables, then receiving the final images through a webhook for further distribution.

Properties

Name Meaning
Template Name or ID The ID of the image template to use for generation. Choose from a dynamically loaded list of available templates or specify an ID directly.
Webhook URL (Only for asynchronous operation) A URL where the generated image file will be POSTed upon completion of rendering.
Variables JSON object containing key-value pairs to populate the template's dynamic fields. These variables customize the content of the generated image.

Output

The node outputs a JSON array where each element corresponds to one generation request. Each element contains the response from the Pdforge API after submitting the generation job.

  • For asynchronous image generation, the immediate output typically includes metadata about the submitted job rather than the final image itself.
  • The actual rendered image file is delivered later to the specified webhook URL.
  • No binary data is output directly by the node during execution.

Dependencies

  • Requires an active Pdforge API account and an associated API authentication token configured in n8n credentials.
  • The node makes HTTP requests to https://api.pdforge.com.
  • The webhook URL must be publicly accessible to receive POST callbacks from Pdforge when the image generation completes.

Troubleshooting

  • Invalid Template ID: If the provided template ID does not exist or is incorrect, the API will return an error. Verify the template ID by loading options or checking the Pdforge dashboard.
  • Malformed Variables JSON: Variables must be valid JSON. Errors parsing this input will cause the node to fail. Use proper JSON formatting.
  • Webhook URL Issues: Ensure the webhook URL is reachable and correctly configured to accept POST requests. Failure to respond may cause missed callbacks.
  • API Authentication Errors: Missing or invalid API credentials will prevent successful requests. Confirm the API key is set up properly in n8n.
  • Network or API Downtime: Temporary network issues or Pdforge service outages can cause request failures. Retry or check service status if errors persist.

Links and References

Discussion