Generate images with OpenAI in a workflow
Generate images with OpenAI in a workflow
In this article:
- What the Generate Image action does
- Connect OpenAI
- Add the Generate Image action
- Image options
- Use the generated image
- Costs and tips
The Generate Image action creates an image from a text prompt using an OpenAI model. You can build the prompt from store data, for example the product title and type, and save the image to Shopify or Google Drive.
What the Generate Image action does
When the workflow reaches the action, React Flow sends your prompt to OpenAI with your API key, receives the image and saves it to the storage you selected. You'll find it under Action > Connectors > Generate Image. The same OpenAI connection is used by the Generate Text action.
Connect OpenAI
You need your own OpenAI API key. Create it in your OpenAI account (platform.openai.com) under API keys.
- In React Flow, go to Connectors and click OpenAI.
- Enter a Name for the connection.
- Paste your key into Api key and save the connection.

Add the Generate Image action
- In a workflow, click +, select Action and choose Generate Image.
- Under Connector, click Select connection and choose your OpenAI connection.
- Enter a File name for the image. You can use variables.
- Choose a Model: gpt-image-1.5 (default), gpt-image-1, gpt-image-1-mini, dall-e-3 or dall-e-2.
- Write the Prompt. Click Add variables to insert store data, for example:
Lifestyle photo of {{ product.title }} on a white background
- Click Save.

Image options
Click Expand options to see more settings. They depend on the model.
For the GPT image models (gpt-image-1.5, gpt-image-1, gpt-image-1-mini):
- Number of images: from 1 to 10.
- Quality: Auto, High, Medium or Low.
- Size: Auto, 1024x1024 (square), 1536x1024 (landscape) or 1024x1536 (portrait).
- Output format: jpeg, png or webp.
- Background: Auto or Opaque.
- Output compression: for jpeg and webp.
- Moderation: Auto or Low.

For dall-e-3: one image per run, Quality Standard or HD, Size 1024x1024, 1792x1024 or 1024x1792, and Style Vivid or Natural.
Under Select storage, choose Shopify (saved to Shopify Files) or Google Drive (see this article).
Use the generated image
- Attach it to an email: in Send email, select Attachments > Add files and pick the image on the Workflow tab.
- Keep it in Shopify Files or Google Drive for your team to review before you use it on the store.
Example: trigger Product added to store → Generate Image with a prompt built from {{ product.title }} → Send email to your content manager with the image attached for review.
Costs and tips
- Image generation is billed by OpenAI to your OpenAI account, separately from your React Flow plan. Higher quality, larger sizes and more images per run cost more.
- Test the prompt with Run Test > Execute on one item before you turn the workflow on.
- Add conditions before the action, for example "product type is Apparel", so you don't generate images you don't need.
✔️ Next step
Check our articles to learn more about the app's functionality:
- Google Drive connector: save workflow files to Google Drive
- Generate PDF documents in a workflow
- React Flow Connectors
- Workflow testing
Updated on: 20/10/2026
Thank you!
