n8n Webhook Workflow: Generate 2 Images via ImageStyle
n8n Webhook Workflow: Generate 2 Images via ImageStyle
Regular price
£52.99
Regular price
£52.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
âš¡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Webhook Workflow: Generate 2 Images via ImageStyle
Regular price
£52.99
Regular price
£52.99
Sale price
Unit price
/
per
Generate images on demand with an n8n Webhook + ImageStyle
This n8n workflow exposes a Webhook that accepts an image prompt (and optional aspect ratio), creates a text-to-image generation task in ImageStyle, polls until completion, and returns the resulting image URL in the webhook response.
What this workflow does
-
Receives a POST request to an n8n webhook with JSON containing
promptand optionalaspectRatio. -
Normalizes inputs by defaulting
aspectRatioto1:1when it isn’t provided. -
Creates an ImageStyle generation task by sending the prompt and aspect ratio to
ImageStyle /api/v1/generate. -
Waits and polls for completion: it waits 5 seconds, then checks status via
ImageStyle /api/v1/generate/{id}until results are available. - Returns a JSON response including the task ID, status, and output URL/images when ImageStyle reports completed.
- Handles failures and timeouts: returns a 502 JSON error if ImageStyle reports failed or if the task runs longer than 10 minutes.
Use cases
- Build a lightweight API endpoint for your SaaS that turns user prompts into generated images instantly.
- Automate marketing asset previews by triggering ImageStyle from a backend service via webhook.
- Create an internal tool for automation engineers to test prompt-to-image generation with consistent aspect ratios.
Technical details
-
n8n nodes:
webhook,set,if,wait,http request, and asticky note. -
ImageStyle integration: uses your ImageStyle API key via an n8n HTTP Header Auth credential sending
Authorization: Bearer <YOUR_API_KEY>. -
Activation: start the workflow, then POST to the webhook URL with
{"prompt":"...","aspectRatio":"1:1"}(or omitaspectRatio).
