Actions7
- Account Actions
- Image Actions
- PDF Actions
- Transaction Actions
Overview
The node integrates with the CraftMyPDF API to create PDF documents asynchronously based on a specified template and input data. It allows users to submit JSON data that populates a PDF template, then generates the PDF in the background. Once the PDF is ready, a callback webhook URL is used to notify the user’s server.
This asynchronous creation is beneficial when generating large or complex PDFs where immediate response is not required, improving workflow efficiency by offloading processing. For example, it can be used to generate invoices, reports, or certificates from dynamic data without blocking the workflow execution.
Properties
| Name | Meaning |
|---|---|
| Region | The API endpoint region to use. Options include Default Endpoint, Australia, Europe (Frankfurt), US East (N. Virginia), alternative endpoints for Europe, Singapore, US East, and a Staging environment. |
| Template ID | The identifier of the PDF template to use for generation. |
| Data | JSON data to populate the PDF template. Can be provided as a stringified JSON or a JSON object. |
| Version | Specific version of the template to use. Defaults to the latest if not specified. |
| Webhook URL | A URL on your server to receive callbacks once the PDF generation is complete. Must be URL-encoded and start with http:// or https://. |
| Expiration | Time in minutes before the generated PDF expires and is no longer accessible. Valid range is 1 to 10080 minutes (7 days). |
| Image Resample Resolution | Resolution in DPI to downsample images within the PDF to reduce file size. Suggested values: 1200, 600, 300, 150, 72. Set to 0 to disable resampling. |
| Resize Images | Boolean flag indicating whether to resize all images in the PDF to reduce file size, useful for templates with many or large images. |
| Resize Max Width | Maximum width in pixels for resized images (effective only if Resize Images is true). |
| Resize Max Height | Maximum height in pixels for resized images (effective only if Resize Images is true). |
| Resize Format | Format for resized images, either JPEG or PNG (effective only if Resize Images is true). |
Output
The output is a JSON object representing the response from the CraftMyPDF API after submitting the asynchronous PDF creation request. This typically includes metadata about the job such as an identifier or status.
Since this operation is asynchronous, the actual PDF file is not returned immediately. Instead, the node expects the configured webhook URL to receive the final PDF or notification once processing completes.
No binary data is output directly by this node during the async creation operation.
Dependencies
- Requires an active connection to the CraftMyPDF API via an API key credential.
- The node must be configured with appropriate credentials to authenticate requests.
- The webhook URL must be publicly accessible to receive callbacks from the CraftMyPDF service.
Troubleshooting
- Invalid JSON Data: If the
Dataproperty contains malformed JSON, the node will throw an error indicating invalid JSON. Ensure the JSON is correctly formatted. - Webhook URL Issues: If the webhook URL is incorrect, unreachable, or not URL-encoded, callbacks may fail, resulting in missing notifications or generated PDFs.
- API Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify the API key is correctly set up.
- Region Misconfiguration: Selecting an incorrect or unsupported region endpoint may lead to connection errors. Confirm the region matches your account and desired endpoint.
- Expiration Limits: Setting expiration outside the allowed range (1 to 10080 minutes) may cause errors. Use valid values only.
- Image Resizing Parameters: If resizing is enabled but max width/height or format are invalid or missing, image processing might fail or produce unexpected results.