Use this powerful n8n workflow to generate or edit images using OpenAI GPT-Image-1 and automatically share results via Telegram. A robust n8n template for creative AI.
Download this n8n workflow template and start using it instantly.
Markdown-formatted text.
Content creators and marketers needing fast visual assets.
Developers looking for advanced openai_integration n8n templates.
Users seeking a versatile n8n workflow for conditional AI image processing.
Teams wanting automated distribution of AI-generated content through Telegram.
This sophisticated n8n workflow acts as a centralized AI image factory, triggered by a custom web form submission. It intelligently switches between two core modes: pure image generation (text-to-image) or image-to-image editing, depending on whether the user provides an input image file or URL. Utilizing the powerful OpenAI GPT-Image-1 model, the automation ensures high-quality results. Once the image is processed, this n8n automation stores the resulting image either on Google Drive or imgbb and finally notifies a specified Telegram channel. This robust n8n template demonstrates effective conditional logic and seamless integration between AI services, storage, and messaging platforms, making it a key component for any creative automation stack. Every step leverages a specific n8n node to ensure smooth data transformation and service interaction.
Markdown-formatted text.
On form submission n8n trigger, capturing user inputs including the image prompt, desired quality, and optionally, an input image file or URL.Switch Mode n8n node analyzes the input. If an existing image URL or file is detected, the workflow branches to the image editing path. Otherwise, it defaults to pure image generation.Get Input Image by URL node fetches the binary data. The Edit Image (OpenAI) n8n node then sends the image and the prompt to the OpenAI /v1/images/edits endpoint using the gpt-image-1 model.Image Generation n8n node sends only the prompt to the OpenAI /v1/images/generations endpoint.Convert json binary to File n8n node to transform the base64-encoded image data received from OpenAI into a usable binary PNG file.Set Access Permissions n8n node) or to imgbb, depending on the preceding path. A subsequent Set n8n node captures the public view and content links.Send to Telegram n8n node posts the generated photo along with the prompt and a direct link to the stored image, concluding the n8n workflow execution.Markdown-formatted text.
Edit Image (OpenAI) and Image Generation n8n nodes with your active OpenAI API credential. This is crucial for the n8n workflow to function.Upload Result Image to Google Drive n8n node with a valid Google Service Account credential.IMGBBAPIKEY in the SETUP API KEY n8n node. Replace the placeholder value.Send to Telegram n8n node, provide your Telegram Bot API credential and ensure the chatId field is set to your target channel or chat ID.On form submission n8n trigger to 'Active'.Markdown-formatted text.
On form submission (n8n trigger): Initiates the entire n8n workflow. It collects Promt, quality (dropdown: low/medium/high), and file/URL inputs for image processing.
Switch Mode: A core n8n node for flow control. It uses conditional logic to determine if the workflow proceeds with image generation (fallback) or image editing (if input image data is present).
Edit Image (OpenAI) / Image Generation (HTTP Request n8n node): Sends requests to OpenAI's DALL-E API (gpt-image-1). Key configuration includes sending binary image data (for editing) or just the text prompt (for generation).
Convert json binary to File (n8n node): Essential data transformation step. It converts the b64_json output field from OpenAI into a binary file format (image/png), allowing subsequent n8n nodes to upload it to storage.
Upload Result Image to Google Drive (Google Drive n8n node): Stores the generated binary file in Google Drive. This n8n node requires service account authentication and specifies setting public read permissions via the connected Set Access Permissions node.
Upload Result Image to imgbb (HTTP Request n8n node): Provides an alternative storage method for results. It uses a multipart form data request, requiring an API key passed via a previous Set n8n node.
Use this powerful n8n workflow to automate AI image generation from a webhook trigger, handling complex logic for text-only or image-plus-text prompts. Saves output to Google Drive and emails the result.

Automate monthly market report generation using n8n. Fetches API data, creates Google Docs reports from n8n templates, retrieves client lists from Google Sheets, and distributes personalized documents via Gmail.

Automate instant landing page creation from a single prompt using this advanced n8n workflow. Integrate GPT, Gemini, Cloudinary, and Vercel for deployment. Use this n8n template for full-stack AI content generation.

Use this powerful n8n workflow to automatically generate custom Non-Disclosure Agreements (NDAs) in DOCX format from web form submissions and email them instantly.

Use this comprehensive n8n workflow to automatically generate personalized PDF certificates from Google Slides after a user passes a Google Forms quiz, and email them instantly using the Gmail n8n node.








































