workflows.fit
Back to n8n workflows
n8n templateFreeBy Robert Breen

Generate multiple AI images with DALL·E 2 and upload to Google Drive

n8n Workflow: OpenAI DALL·E 2 Image Generation & Google Drive Upload Description This n8n workflow automates the process of generating multiple AI-created images from a single prompt using OpenAI's DALL·E 2, then uplo...

Data & StorageDevelopmentCore NodesAILangchainOpen AiSplit In BatchesManual Trigger
Loading interactive preview...

Template notes

n8n Workflow: OpenAI DALL·E 2 Image Generation & Google Drive Upload

Description This n8n workflow automates the process of generating multiple AI-created images from a single prompt using OpenAI's DALL·E 2, then uploads the results directly to a Google Drive folder. It includes a loop to produce several image variations for the same prompt, making it ideal for creative projects, marketing materials, or content experimentation.

---

Step-by-Step Setup Instructions

1. Prepare Your API Keys - OpenAI API Key 1. Sign up or log in at https://platform.openai.com/ 2. Go to API Keys and create a new one. 3. Copy and store this securely — you'll need it in n8n.

- Google Drive API 1. Go to https://console.cloud.google.com/ 2. Create a project and enable Google Drive API. 3. Create OAuth 2.0 credentials and set the redirect URI to your n8n OAuth redirect (found in your n8n Google Drive node setup). 4. Connect your Google account when adding credentials in n8n.

---

2. Workflow Nodes Overview 1. Manual Trigger – Starts the workflow manually. 2. Set Image Prompt – Stores the prompt text and base file name (e.g., “Make an image of an attractive woman standing in New York City”). 3. Duplicate Rows (Code Node) – Creates multiple "runs" of the same prompt for variation. 4. Loop Over Items – Processes each variation one at a time. 5. Generate an image (OpenAI DALL·E 2) – Sends the prompt to OpenAI and retrieves an image. 6. Upload to Google Drive – Saves each generated image to your chosen Google Drive folder.