← All N8N workflows
AI & researchConvert To FileHTTP RequestManual Trigger

🎨 Image Generation (OpenAI)

Configured with Convert To File, HTTP Request. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhen clicking ‘Testworkflow’Manual TriggerWeb / APIEdit Image (OpenAI)HTTP RequestWeb / APICreate image callHTTP RequestTransformConvert json binary toFileConvert To FileTransformConvert json binary toFile finalConvert To File

Node categories in this workflow

  • Trigger
  • Web / API
  • Transform

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
When clicking ‘Test workflow’TriggerManual TriggerSee node parameters
Edit Image (OpenAI)Web / APIHTTP RequestPOST
Create image callWeb / APIHTTP RequestPOST
Convert json binary to FileTransformConvert To FiletoBinary
Convert json binary to File finalTransformConvert To FiletoBinary

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • openAiApi

Workflow notes

🧪 Manual Trigger

🧪 Manual Trigger

Starts the workflow manually. Ideal for testing and debugging purposes.

🎨 Image Generation (OpenAI)

🎨 Image Generation (OpenAI)

Sends a POST request to the OpenAI /v1/images/generations endpoint.

  • Uses gpt-image-1 model
  • Generates an image from a given prompt
  • Returns a base64-encoded image (b64_json)

📌 Output: data[0].b64_json

🧾 Convert base64 to File

🧾 Convert base64 to File

Converts the b64_json field into a binary PNG file to use in the next step.

📤 Output: Binary image under the data field

✏️ Image Editing (OpenAI)

✏️ Image Editing (OpenAI)

Sends the binary image to OpenAI’s /v1/images/edits endpoint with a descriptive prompt.

  • Model: gpt-image-1
  • Format: multipart/form-data
  • Requires a real file (not base64)
  • Supports optional mask input

📥 Input: Binary image from data 📤 Output: Edited image in b64_json

🧾 Final Conversion (base64 → File)

🧾 Final Conversion (base64 → File)

Converts the edited image (b64_json) into a downloadable or previewable PNG file.

📤 Output: Final binary image

🧠 Image AI Workflow Overview

🧠 Image AI Workflow Overview

This workflow uses OpenAI's image generation and editing APIs with the gpt-image-1 model.

🔑 Requirements:

  • You must use your own OpenAI API key from https://platform.openai.com/account/api-keys
  • Create a credential in n8n called OpenAi AIFB account (or use your own name)

💰 Cost Warning:

  • This model is powerful but expensive.
  • Each image costs $0.020 to $0.190 depending on resolution and type.
  • Always monitor your usage via the OpenAI dashboard

🔍 Why use gpt-image-1?

  • Unmatched semantic control: you can edit specific parts of images with detailed prompts.
  • Supports multiple input images, coherent edits, and future multi-modal tasks.
  • Editing works with or without a transparency mask.

🔧 Suggested Nodes to Expand Workflow:

  • Webhook (trigger via your frontend or app)
  • Telegram / Slack (prompt image generation from chat)
  • Set node (inject dynamic prompts or user context)
  • IF / Switch (change behavior depending on prompt type)
  • Merge (combine multiple image generations)
  • HTTP Request (send generated images to external APIs or CMS)

💡 Example Use Cases:

  • Marketing teams: generate product visuals on demand
  • Designers: edit and re-style illustrations without Photoshop
  • E-commerce: dynamic generation of themed mockups
  • Content creators: create blog and social thumbnails in bulk

⚠️ Don't forget to add rate limiting or batch controls if generating large volumes!

🎨 Image Generation (OpenAI)

🎨 Image Generation (OpenAI)

Purpose and structure

This folder contains the 🎨 Image Generation (OpenAI) workflow. Its executable nodes use convertToFile, httpRequest, manualTrigger. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

When clicking ‘Test workflow’

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Manual/0887_Manual_Stickynote_Create_Webhook.json MIT; preserve source notices.

More in AI & research