Actions6
- Generate PDF Actions
- Generate Image Actions
- Convert HTML to PDF Actions
Overview
This node integrates with the Pdforge service to generate PDF or image files based on predefined templates or HTML content. It supports synchronous and asynchronous generation modes, allowing users to create documents dynamically by providing template variables or raw HTML.
Common scenarios include:
- Automating report generation where data is merged into a PDF template.
- Creating images or PDFs from dynamic content for invoices, certificates, or marketing materials.
- Using asynchronous generation with webhook callbacks to handle large or time-consuming document creation without blocking workflows.
For example, a user can select a PDF template, supply variables like customer name and date, and receive a generated PDF file. Alternatively, they can provide raw HTML to convert directly into a PDF.
Properties
| Name | Meaning |
|---|---|
| Template Name or ID | Select a template from the list of available Pdforge templates or specify its ID via an expression. Templates define the layout and placeholders for variable substitution in PDFs or images. |
| Variables | JSON object specifying key-value pairs to fill the template's variables. For example: { "customerName": "John Doe", "date": "2024-06-01" }. These values replace placeholders in the selected template. |
| Webhook URL | (Only for asynchronous operation) A URL where Pdforge will POST the rendered file once generation completes. Useful for non-blocking workflows that wait for document readiness via webhook callbacks. |
| Options | Collection of optional settings: • S3 Bucket: ID of an active S3 connection configured in Pdforge to override default storage location. • S3 Key: Path inside the S3 bucket where the file will be saved. |
Output
The node outputs an array of JSON objects representing the response from the Pdforge API for each input item processed. The exact structure depends on the operation but generally includes metadata about the generated file such as URLs, IDs, or status.
If asynchronous generation is used, the output contains immediate acknowledgement data, while the actual file is delivered later via the specified webhook.
Binary data is not directly output by this node; instead, it provides references (e.g., URLs) to the generated files stored remotely or accessible via Pdforge.
Dependencies
- Requires an API key credential for authenticating with the Pdforge API.
- Pdforge service must be accessible at
https://api.pdforge.com. - For S3 storage options, an active S3 connection must be configured within Pdforge.
- If using asynchronous generation, a publicly accessible webhook URL must be provided to receive callbacks.
Troubleshooting
- Invalid Template ID or Name: Ensure the template exists in Pdforge and the correct ID or name is provided. Use the node’s template loading option to select valid templates.
- Malformed Variables JSON: Variables must be valid JSON. Errors parsing variables will cause failures. Validate JSON syntax before running.
- Webhook Not Receiving Callbacks: Confirm the webhook URL is reachable from Pdforge and correctly configured to accept POST requests.
- S3 Storage Issues: Verify that the specified S3 bucket and key are correct and that the Pdforge account has permissions to write to the bucket.
- API Authentication Errors: Check that the API key credential is valid and has necessary permissions.