Skip to content

Generate Images in n8n from a Template

Generate Images in n8n from a Template

Here's the fastest way to generate images in n8n from a template: add one HTTP Request node, point it at an imejis design, and pass your data as fields. The render API returns a finished image, on-brand every time, because the layout is fixed and only the data changes. No design work inside n8n, no AI-prompt lottery, no second service to host the result.

Most people don't run this once by hand. They run it on a schedule, as one step inside a real posting pipeline:

Diagram of the daily n8n pipeline: a trigger fires each morning, n8n pulls the next planned post, builds the template fields, imejis renders the image and returns a URL, and the scheduler publishes the post

imejis owns exactly one box in that chain, the image step. n8n runs the schedule, reads your content plan, and hands the finished post to whatever publishes it.

What you'll build

A daily n8n workflow that wakes up on a schedule, pulls the next post from your content plan, builds a branded image from a fixed template, and hands the image URL to your scheduler to publish. Five nodes, and only one of them is imejis. Here it is running on a real n8n canvas:

The finished workflow on the n8n canvas: Every morning, Get next planned post, Build image fields, Render image (imejis), and Publish to scheduler

You'll reuse the same shape for social cards, certificates, price tags, or open-graph images. Swap the design, keep the flow.

Prerequisites

  • A running n8n instance (self-hosted or cloud). The HTTP Request node is built in, so there's nothing to install.
  • An imejis account and a render API key. You'll send it as the dma-api-key header.
  • One imejis design with at least one field marked dynamic. That field is what you'll override per render.
  • Somewhere your planned posts live: a Google Sheet, an Airtable base, a CMS, or any API n8n can read. The pipeline pulls the next row from it.

You don't need a plugin or a community node. The imejis side is one standard HTTP call.

How to generate images in n8n from a template

Five nodes, left to right. Only the fourth one is imejis; the rest is your normal posting flow.

Step 1: Trigger it on a schedule

Start with a Schedule Trigger set to the time you post, or a Webhook if something else kicks it off. For a daily graphic, "every morning at 9" is the whole configuration. This is the node that makes the pipeline run without you.

Step 2: Pull the next planned post

Read the next item from wherever you plan content. A Google Sheets or Airtable node fetches a row; an HTTP Request node hits your CMS. Either way the output is one post: its headline, its subtitle, the campaign it belongs to. That data is what the template will render.

Step 3: Build the image fields

Add an Edit Fields (Set) node to map the post onto the template's field keys. The post calls it headline; the design's dynamic component is title.text. This node is where that translation happens, and where you'd branch on the kind of post, picking a different headline or template per campaign.

Step 4: Render the image with imejis

This is the one imejis node. Set the method to POST and the URL to your design's render endpoint. The design id is the short code from the design's render config.

POST https://render.imejis.io/v1/YOUR_DESIGN_ID?delivery=hosted
Content-Type: application/json
dma-api-key: YOUR_RENDER_KEY
 
{
  "title.text": "{{ $json.headline }}",
  "subtitle.text": "{{ $json.subtitle }}"
}

Two details matter here. Authenticate with the dma-api-key header, not a bearer token, because the render endpoint reads only that key. And put delivery=hosted on the query string, not in the JSON body. The body is only field overrides, so a delivery key there is ignored and you get raw image bytes back instead of a URL. With ?delivery=hosted the node gets a durable link for the next step.

The HTTP Request node in n8n, configured with method POST, the render.imejis.io URL carrying delivery=hosted, authentication set to None, and a dma-api-key header

In the body, map the fields you built in Step 3 onto the design's dynamic components:

The same HTTP Request node's JSON body, mapping the post's headline and subtitle expressions onto the template fields title.text and subtitle.text

With delivery=hosted, the response is JSON that carries a permanent URL: { "success": true, "delivery": "hosted", "url": "https://....jpg" }. The next node reads it as {{ $json.url }}. That URL is your finished image, generated fresh from the template and your data.

To smoke-test a single field before you wire up the body, a plain GET with dot-path query params is the quickest check:

GET https://render.imejis.io/v1/YOUR_DESIGN_ID?title.text=Launch%20Day
dma-api-key: YOUR_RENDER_KEY

Omit delivery and the response is the image itself, so you see the field change immediately. Add &delivery=hosted back once you want the URL.

Step 5: Publish the post

Hand the URL to whatever comes next: an email node, a storage node, or a social scheduler like Postiz or Mixpost. imejis renders the picture; the downstream node does the posting. We'd recommend testing the full chain once end to end before you schedule it, so a bad field surfaces now rather than at 9am.

Stream, hosted, or signed: which URL to use

The render call can return the image three ways. For an n8n workflow that posts later, the choice is what keeps the image from vanishing before publish.

DeliveryWhat you getUse it in n8n when
streamRaw image bytesYou store or email the file in the same run
hostedA permanent public URLA later node or a scheduler fetches it after a delay
signedA time-limited URLThe image is private and consumed within the hour

Most posting workflows want hosted, because the publish step runs minutes or hours after the render. A signed URL can expire first, and that's the usual cause of a broken image in the post.

Or skip the wiring: automate it with MCP

Don't want to build nodes by hand at all? imejis ships an MCP server, so an AI agent can do the imejis side for you. In Claude, Cursor, or any MCP client, the agent creates the design, marks the fields dynamic, and renders the image on request, then returns the URL. You describe the card once in plain language, and the agent builds it and renders it.

For a fully hands-off pipeline, pair the imejis MCP with your scheduler's own MCP. Postiz ships one, so an agent can generate the image through imejis and let the scheduler publish it, with no workflow to maintain. n8n and MCP aren't an either-or choice. Reach for n8n when you want a fixed, visual workflow you can see, and MCP when you'd rather an agent assemble the whole thing on demand. See generating images with Claude over MCP and the agent connect hub to set it up.

Common issues and fixes

  • 401 from the render call. You sent a bearer token. The render endpoint only accepts dma-api-key. Move the key into that header.
  • The field didn't change. You addressed a field that isn't marked dynamic, or used the wrong key. Only dynamic components are overridable, and the key is the snake_case handle from the design, not the layer's display name.
  • Broken image in the published post. The URL expired before the post went out. Switch from signed to hosted.
  • You want many images at once. Don't loop a thousand single calls if you can avoid it. The bulk export tool returns up to 25 renders per call for batches.

Next steps

Once the core node works, the pattern scales in every direction. For ten ready-made n8n recipes built on this same call, see the copy-paste workflows guide. For wiring Google Sheets, Airtable, or webhooks as the data source, see the n8n image automation guide and the n8n integration page. When you're ready to design the template itself, the image generation API docs cover the field model, and pricing has the free render allowance. The official n8n HTTP Request documentation covers auth and expressions if you're new to the node.

Frequently asked questions

No. n8n orchestrates the workflow and makes the HTTP call, but the image comes from a render API. You point n8n at an imejis design, pass your data, and get a finished PNG back.

Only for the step that posts it. The render call returns the image directly, but most social nodes need a reachable URL, so use the hosted delivery mode and pass that URL downstream.

Yes. Loop the HTTP Request node over your rows, one render per item. For large batches, the bulk export tool returns up to 25 images in a single call instead of 25 separate requests.

The downstream node fetched a URL that had already expired. Signed URLs are short-lived, so for a post that publishes later, use a hosted URL that stays live.

n8n is free to self-host, and each image is one render on your imejis plan. The free tier includes a monthly render allowance, so you can build and test the workflow before paying anything.

We use cookies to run the site and, depending on your region and your choice here, for analytics and marketing. See our Cookie Policy. You can change this any time from “Cookie settings” in the footer.