What this workflow does
This workflow lets you turn text prompts into images fast using n8n and OpenAI.
It solves the problem of slow manual graphic design by automating image creation.
You get unique pictures based on your text, ready to download right after submitting the form.
The user fills a form with a description and image size.
Then, OpenAI creates the image and sends it back as a file.
This removes hours of waiting for pictures and makes the process quick and simple.
Who should use this workflow
This is perfect for anyone needing custom images quickly,
like designers handling many clients without time for manual work.
If users want a tool to make images from text without tech knowledge or long delays,
this workflow fits well.
It is good for small businesses, freelancers, or social media managers needing fresh visuals fast.
Tools and services used
- n8n: Automates the steps and connects nodes.
- OpenAI API: Creates images from text prompts.
- Form Trigger node in n8n: Gets text and size inputs from users.
If users want full control or server environment, they can consider self-host n8n.
This helps run everything independently.
Inputs, processing steps, and output
Inputs
- User text description of the image.
- Choice of image size from dropdown options.
Processing Steps
- Form Trigger node receives inputs.
- HTTP Request node sends prompt and size to OpenAI API, requesting image generation.
- Convert to File node transforms base64 response from OpenAI into a downloadable image file.
- Form node sends image back to user as downloadable content.
Output
User gets a unique image file based on their prompt and size.
This file is usable instantly for use in posts or designs.
Beginner step-by-step: How to use this workflow in production
Import the workflow
- Download the workflow file using the “Download” button on this page.
- Open the n8n editor and go to “Workflows.
- Click “Import from File” and load the downloaded workflow file.
Configure settings
- Set your OpenAI API Key in the credentials section.
- Check the HTTP Request node has the right API Key attached.
- If needed, update the form fields or image sizes in the Form Trigger node.
Test and activate
- Trigger the form webhook URL by submitting a test prompt and size.
- Check that the returned file can be downloaded and opens correctly.
- Once testing works, activate the workflow with the toggle switch to run in production.
Customization ideas
- Change the “model” parameter in the HTTP Request node to try other image-generation models.
- Increase “n” number in the API request to get multiple images per prompt for options.
- Add extra fields like “Style” or “Color” in the Form Trigger node for more control.
- Add a node after Convert to File node to save images automatically to cloud storage (Google Drive, AWS S3).
- Insert an image editing step to add watermarks before sending back the image.
Troubleshooting common problems
401 Unauthorized error from OpenAI API
This means the API key is wrong or missing.
Go to credentials in n8n and enter the correct OpenAI API Key.
Make sure the HTTP Request node uses this credential.
No image returned in form response
The binary data is not connected properly.
Check that Convert to File node outputs the right property, and the Form node uses that binary data for returning.
Pre-production checklist
- Verify the OpenAI API Key is active with image generation permissions.
- Test the form with typical prompts and image sizes.
- Confirm the Convert to File node creates a valid image file.
- Check the returned form response allows downloading images in different browsers.
- Backup the workflow JSON before big edits.
Deployment guide
After testing, activate the workflow in n8n to run automatically.
Share the form webhook URL with users to get image requests.
Watch workflow executions in n8n for errors or slow responses.
Make sure OpenAI usage limits are not exceeded.
Summary of results
✓ Quickly produce custom images from text prompts.
✓ Remove slow manual image creation steps.
✓ Get immediate, downloadable image files via a simple form.
✓ Easily handle multiple requests without coding.
✓ Save hours of design time every week.
{
model: "gpt-image-1",
prompt: "={{ $json.Prompt }}",
n: 1,
size: "={{ $json['Image size'] }}"
}

