Actions6
- Generate PDF Actions
- Generate Image Actions
- Convert HTML to PDF Actions
Overview
This node integrates with the Pdforge API to generate PDF or PNG files based on predefined templates or HTML content. Specifically, for the "Generate Image" resource with the "Generate Asynchronously" operation, it allows users to start an asynchronous image generation process from a selected template and variables. The node sends a request to Pdforge to render the image and optionally notifies a specified webhook URL when the rendering is complete.
Common scenarios include:
- Automating the creation of customized images (e.g., certificates, badges, marketing materials) based on dynamic data.
- Offloading image rendering to an external service and receiving a callback once the image is ready.
- Storing generated images in cloud storage like S3 by specifying bucket and key options.
Practical example:
- A marketing workflow where user data is passed as variables to a certificate template, triggering asynchronous image generation. Once done, Pdforge posts the rendered image file to a webhook URL for further processing or distribution.
Properties
| Name | Meaning |
|---|---|
| Template Name or ID | Select a template from the list or specify its ID via expression. This template defines the layout and design of the image to be generated. |
| Variables | JSON object containing key-value pairs that correspond to the variables defined in the chosen template. These values dynamically populate the template fields during image generation. |
| Webhook URL | (Only for asynchronous operation) A URL where Pdforge will POST the rendered image file upon completion. Useful for receiving notifications or triggering downstream workflows after image generation finishes. |
| Options > S3 Bucket | Optional. Specify the ID of an active S3 connection configured in Pdforge to override the default storage location for the generated image. |
| Options > S3 Key | Optional. Define the path inside the S3 bucket (folders and filename without extension) where the generated image will be saved. |
Output
The node outputs an array of JSON objects representing the response from the Pdforge API for each input item processed. Each JSON object contains details about the initiated asynchronous image generation request, such as status, job ID, or any metadata returned by Pdforge.
If the asynchronous operation completes later, the actual rendered image file is sent to the provided webhook URL; thus, the node itself does not output the binary image data directly.
Dependencies
- Requires an API key credential for authenticating with the Pdforge API.
- Needs network access to
https://api.pdforge.com. - For webhook functionality, a publicly accessible URL must be provided to receive POST callbacks.
- Optionally requires an active S3 connection configured in Pdforge if using S3 storage options.
Troubleshooting
- Invalid Template ID: If the template ID is incorrect or missing, the API will reject the request. Ensure the template exists and the ID is correct.
- Malformed Variables JSON: Variables must be valid JSON. Parsing errors can occur if the JSON syntax is invalid.
- Webhook URL Issues: If the webhook URL is unreachable or misconfigured, you may not receive the rendered file notification. Verify the URL is publicly accessible and correctly handles POST requests.
- S3 Storage Errors: Incorrect S3 bucket or key settings can cause storage failures. Confirm the S3 connection is active and the path is valid.
- API Authentication Failures: Ensure the API key credential is set up properly and has necessary permissions.
Links and References
- Pdforge API Documentation (for detailed API usage and template management)
- n8n Expressions Documentation (for using expressions in property fields)
- Webhook Basics (to understand how to handle webhook callbacks in n8n)