Overview
This node integrates with the Orshot API to generate images automatically from predefined library templates. It is designed for marketing automation workflows where dynamic image creation is needed, such as generating personalized banners, social media posts, or promotional materials based on template designs.
Users select a template from Orshot's library and can apply modifications (customizations) to alter text, colors, or other template parameters before rendering the final image. The node supports multiple output formats and response types, making it flexible for different use cases like embedding images directly in emails, saving files, or sharing URLs.
Practical examples:
- Automatically create customized product promotion images by changing text and price fields.
- Generate event flyers with dynamic dates and locations.
- Produce social media graphics with user-specific data embedded.
Properties
| Name | Meaning |
|---|---|
| Template Name or ID | Select the library template to render from. Choose from a list loaded dynamically or specify an ID via expression. |
| Response Type | Type of response to return: - Base64: Image encoded as a base64 string. - Binary: Raw binary data suitable for file handling. - URL: A URL pointing to the generated image. |
| Response Format | Format of the rendered image: - JPEG - JPG - PNG - WebP |
| Modifications | Template modifications to apply. Add one or more key-value pairs where the key is a modification option (loaded dynamically based on the selected template) and the value is the customization to apply (e.g., new text). |
Output
The node outputs JSON data containing details about the generated image along with the image data itself depending on the chosen response type:
Base64:
data: The image encoded as a base64 string.mimeType: The MIME type corresponding to the selected format (e.g.,image/png).- Other metadata:
templateId,responseType,responseFormat,statusCode, and appliedmodifications.
Binary:
- The image is provided as binary data under the
binary.dataproperty with the appropriate filename extension and MIME type. - Metadata similar to base64 is included in the JSON part.
- The image is provided as binary data under the
URL:
data: Contains the URL string or parsed JSON object returned by the API pointing to the generated image.- Other metadata as above.
This structure allows downstream nodes to handle the image data flexibly, whether saving to disk, uploading elsewhere, or embedding inline.
Dependencies
- Requires an API key credential for authenticating requests to the Orshot API.
- Needs internet access to call Orshot endpoints:
https://api.orshot.com/v1/generate/imagesfor library template image generation.
- The node uses n8n's HTTP request helper with authentication to communicate securely with Orshot.
- No additional external libraries are required beyond n8n's standard environment.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Selecting a non-existent template ID or modification key may result in API errors.
- Network connectivity problems can prevent successful API calls.
- Incorrect response type or format combinations might lead to unexpected output or errors.
Error messages:
"API request failed with status XXX"indicates the HTTP status code returned by Orshot. The message may include further error details from the API response.- Errors loading templates or modifications will mention failure reasons, often related to authentication or network issues.
- If the node is set to continue on fail, errors are returned in the output JSON under
erroranderrorDetailsfields for easier debugging.
Resolution tips:
- Verify that the API key credential is correctly configured and has necessary permissions.
- Ensure the template and modification keys exist and are valid.
- Check network connectivity and firewall settings.
- Use expressions carefully when specifying IDs to avoid invalid values.
- Enable "Continue On Fail" during testing to capture detailed error info without stopping workflow execution.