Templated icon

Templated

n8n node to automate the generation of images and PDFs.

Render → Create a Render

AI-generated

Overview

The node "Templated" automates the generation of images and PDFs by creating renders based on predefined templates. It is particularly useful in scenarios where dynamic visual content needs to be generated programmatically, such as creating personalized marketing materials, generating customized certificates, or producing branded images with variable text and graphics.

For example, a user can specify a template ID and provide multiple layers with custom text, images, colors, fonts, and other styling options. The node then produces a rendered image or PDF according to these specifications. Additionally, it supports sending the completed render object to a specified webhook URL for further processing or storage.

Properties

Name Meaning
Template ID The template ID that you want to use for rendering. This identifies which base design will be used.
Layers A collection of layers to customize the render. Each layer can have:
- Layer Name: Identifier of the layer.
- Text: Replacement text.
- Image URL: Replacement image source.
- Color: Hex color code.
- Background: Background hex color.
- Font Family: Font family name.
- Font Size: CSS font size value (e.g., "24px").
- Border Width: Numeric width of border.
- Border Color: Hex color for border.
- Fill: Shape fill color in hex.
- Stroke: Shape stroke color in hex.
- Hide: Boolean to hide the layer.
Webhook URL A URL to which the full Render object will be POSTed once rendering is completed. Useful for asynchronous workflows or notifications.
Format The output format of the render. Options are JPG, PNG, WEBP, or PDF. Default is JPG.
Transparent Boolean flag indicating whether the background should be transparent when the format is PNG. Default is false.

Output

The node outputs a JSON object representing the created render. This includes details about the rendered file such as its URL, metadata, and status. If a webhook URL is provided, the full render object will also be sent there upon completion.

If the render format supports binary data (like images or PDFs), the node will handle this accordingly, typically providing a downloadable link or binary data reference within the output JSON.

Dependencies

  • Requires an API key credential for authentication with the external templating/rendering service.
  • Needs network access to the templating service's base URL configured via credentials.
  • Optional webhook URL for receiving asynchronous render completion callbacks.

Troubleshooting

  • Invalid Template ID: If the template ID does not exist or is incorrect, the node will fail to create a render. Verify the template ID is correct and accessible.
  • Layer Configuration Errors: Incorrectly formatted layer properties (e.g., invalid color codes, missing required fields) may cause rendering errors. Ensure all layer inputs conform to expected formats.
  • Webhook Failures: If the webhook URL is unreachable or returns errors, the node might log webhook delivery failures. Confirm the webhook endpoint is valid and able to accept POST requests.
  • Authentication Issues: Missing or invalid API keys will prevent communication with the rendering service. Check that the API key credential is properly set up.
  • Unsupported Format: Selecting a format outside the allowed options (jpg, png, webp, pdf) will cause errors. Use only supported formats.

Links and References

  • No direct links available from the source code. For more information, consult the documentation of the external templating/rendering API associated with the API key credential.

Discussion