Actions7
- Account Actions
- Image Actions
- PDF Actions
- Transaction Actions
Image → Create
AI-generatedOverview
This node operation creates an image using a specified template and data. It allows users to generate images based on JSON data and a template ID, with options to specify the version of the template, export type (JSON or file), expiration time, output file name, and output image format (JPEG or PNG). This is useful for automating image generation tasks such as creating customized graphics, marketing materials, or reports from templates.
Use Case Examples
- Generate a marketing banner image by providing template ID and data with customer details.
- Create a product label image using a predefined template and export it as a file for secure storage.
Properties
| Name | Meaning |
|---|---|
| Region | Region of the API endpoint to use for the request, such as default, Australia, Europe, US East, or alternative endpoints. |
| Template ID | ID of the template to use for generating the image. |
| Data | JSON data to populate the template; supports either a stringified JSON or a JSON object. |
| Version | Specific version of the template to use; defaults to the latest version if not specified. |
| Export Type | Format of the image output, either JSON (image stored on CDN) or file (binary data for secure and private output). |
| Expiration | Expiration time in minutes for the generated image when using JSON export type. |
| Output File | Name of the output file when exporting the image as a file. |
| Output Type | Image file format for the output file, either JPEG or PNG. |
Output
Binary
Binary data of the generated image file when export type is 'file'.
JSON
template_id- ID of the template used for image generation.data- The JSON data used to populate the template.version- Version of the template used.export_type- Type of export requested (json or file).expiration- Expiration time for the generated image in minutes.output_file- Name of the output file for the image.output_type- Image file format (jpeg or png).url- URL of the generated image when export type is JSON.
Dependencies
- An API key credential for authentication with the CraftMyPDF API.
Troubleshooting
- Invalid JSON data in the 'Data' property will cause an error; ensure the JSON is correctly formatted.
- If the export type is 'file', ensure the output file name and type are correctly specified to avoid file handling errors.
- API endpoint region must be correctly selected to avoid connectivity issues.