Actions7
- Account Actions
- Image Actions
- PDF Actions
- Transaction Actions
PDF → Create Async
AI-generatedOverview
This node operation allows users to create PDF documents asynchronously using a specified template and data. It is useful for generating PDFs where the process might take some time, and the user wants to receive the result via a webhook callback. Common scenarios include generating invoices, certificates, or reports that require asynchronous processing to avoid blocking workflows.
Use Case Examples
- Generate a PDF invoice asynchronously by providing the invoice data and template ID, then receive the completed PDF via a webhook URL.
- Create a certificate PDF asynchronously with custom data and get notified when the PDF is ready through a callback URL.
Properties
| Name | Meaning |
|---|---|
| Region | Specifies the API endpoint region to use for the request, such as default, Australia, Europe, US East, or alternative/staging endpoints. |
| Template ID | The identifier of the PDF template to use for generating the document. |
| Data | The JSON data to populate the template. Supports either a JSON object or a stringified JSON string. |
| Version | The version of the template to use. Defaults to the latest version if not specified. |
| Webhook URL | The callback URL where the generated PDF result will be sent asynchronously. Must be URL encoded and start with http:// or https://. |
| Expiration | The expiration time in minutes for the generated PDF document. |
| Image Resample Resolution | Resolution in DPI to downsample images in the PDF to reduce file size. Set to 0 to disable. |
| Resize Images | Whether to resize all images in the PDF to reduce file size, especially useful for templates with multiple or large images. |
| Resize Max Width | Maximum width in pixels for resized images. Only applicable if Resize Images is enabled. |
| Resize Max Height | Maximum height in pixels for resized images. Only applicable if Resize Images is enabled. |
| Resize Format | Format to use for resized images, either JPEG or PNG. Only applicable if Resize Images is enabled. |
Output
JSON
id- The unique identifier of the created asynchronous PDF job.status- The current status of the PDF creation job.webhook_url- The webhook URL provided for callback when the PDF is ready.created_at- Timestamp when the PDF creation job was initiated.
Dependencies
- An API key credential for authenticating with the CraftMyPDF API
Troubleshooting
- Invalid JSON data in the 'Data' property will cause an error; ensure the JSON is correctly formatted.
- Webhook URL must be a valid URL starting with http:// or https:// and properly URL encoded.
- If the API request fails, check the region endpoint and API key credentials for correctness.