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 images based on predefined templates or HTML content. Specifically, for the "Generate Image" resource and the "Generate Synchronously" operation, it allows users to create images synchronously from a selected template by providing variable data to populate the template.
Common scenarios include:
- Automatically generating customized images (e.g., certificates, badges, promotional graphics) based on user data.
- Creating dynamic visual content for reports or marketing materials without manual design.
- Integrating image generation into automated workflows where immediate output is required.
Example: A marketing team could use this node to generate personalized event invitations as images by selecting a template and passing attendee names and details as variables.
Properties
| Name | Meaning |
|---|---|
| Template Name or ID | Select a template from a list of available templates or specify its ID via an expression. This template defines the layout and placeholders. |
| Variables | JSON object containing key-value pairs to fill in the template's variables. For example, { "name": "John", "date": "2024-06-01" }. |
| Options | Additional settings including: • S3 Bucket: ID of an active S3 connection to override default storage location. • S3 Key: Path and filename (without extension) inside the S3 bucket where the generated file will be saved. |
Output
The node outputs an array of JSON objects corresponding to each input item processed. Each JSON object contains the response from the Pdforge API for the image generation request. The exact structure depends on the API but typically includes metadata about the generated image such as URLs or IDs.
If configured to save to S3, the output may include references to the stored file location.
No binary data is directly output by the node; instead, the output JSON provides links or identifiers to access the generated images.
Dependencies
- Requires an active Pdforge API key credential configured in n8n.
- Access to Pdforge templates must be set up beforehand.
- Optional: An active S3 connection configured in Pdforge if using the S3 storage options.
- Network access to
https://api.pdforge.comis necessary.
Troubleshooting
- Invalid Template ID: If the specified template does not exist or is inaccessible, the API will return an error. Verify the template ID or select from the dropdown.
- Malformed Variables JSON: Providing invalid JSON in the Variables field will cause parsing errors. Ensure the JSON syntax is correct.
- Missing API Credentials: The node requires valid Pdforge API credentials. Check that the credential is properly configured and has necessary permissions.
- S3 Storage Errors: If specifying S3 bucket/key options, ensure the referenced S3 connection is active and the path is valid.
- API Rate Limits or Downtime: Pdforge API might throttle requests or be temporarily unavailable. Retry after some time or check Pdforge status.
Links and References
- Pdforge API Documentation (for detailed API usage)
- n8n Expressions Documentation (for using expressions in property fields)
- Pdforge Interface (to view and manage templates and their variables)