Skip to main content

Generate images with GPT-image-1 and store in Google Drive with cost tracking

Workflow preview

Workflow preview
100%
Generate images with GPT-image-1 and store in Google Drive with cost tracking preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works Receive a chat input as an image prompt. Call OpenAI's API to generate an image. Split the returned images and process them one by one. Upload each generated image to Google Drive . Sa...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.httprequest, n8n-nodes-base.googledrive, n8n-nodes-base.splitout, n8n-nodes-base.converttofile, n8n-nodes-base.splitinbatches, n8n-nodes-base.set, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by darrell_tw.

Original n8n.io source

1.1 Workflow description

Title
Generate images with GPT-image-1 and store in Google Drive with cost tracking
Workflow name
Generate images with GPT-image-1 and store in Google Drive with cost tracking

How it works

  • Receive a chat input as an image prompt.
  • Call OpenAI's gpt-image-1 API to generate an image.
  • Split the returned images and process them one by one.
  • Upload each generated image to Google Drive.
  • Save image links and thumbnails to a Google Sheets document.
  • Record token usage and estimated cost into a separate sheet.

Set up steps

  1. Connect your OpenAI API credentials for image generation.
  2. Connect your Google Drive and Google Sheets accounts.
  3. Set the destination folder in Google Drive.
  4. Set the target Google Sheet and specify the correct sheet tabs.
  5. The setup usually takes around 5-10 minutes.
  6. Detailed field mappings are already pre-configured inside the workflow.
  7. Additional tips and instructions are included as sticky notes inside the workflow.

Google Sheet copy url

Copy Sheet Link

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking 'Test workflow'

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 4 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 5 - Convert to File

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 6 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 7 - Edit Fields-file_name

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Edit Fields1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 10 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 11 - Google Sheets1

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 12 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 13 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate images with GPT-image-1 and store in Google Drive with cost tracking
Complexity advanced
Nodes 16
Categories Content Creation, Multimodal AI
Author darrell_tw
Published 25 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3710/3710.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate images with GPT-image-1 and store in Google Drive with cost tracking do?

How it works Receive a chat input as an image prompt. Call OpenAI's API to generate an image. Split the returned images and process them one by one. Upload each generated image to Google Drive . Sa...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.