Invoices, documents and PDFs

Chat prompt to ChatGPT image generation, Drive storage and Sheets log

Short answer

This AI-assisted n8n workflow captures image prompts via a chat trigger or test run and calls the image generation API over HTTP. Returned image arrays split and loop through file conversion before uploading into Google Drive. Every asset link and aggregated usage record logs cleanly in Google Sheets.

Catalogue ID
#1983
Functional nodes
12
Connections
12
Trigger
manualTrigger, chatTrigger
AI layer
AI-assisted
Business problem solved

Business problem solved

Creative teams generating batch visuals inside chat sessions lose track of prompts, asset locations and run volume. Saving multiple images one by one into Drive and updating spreadsheets takes unnecessary time.

Trigger

The chat trigger executes immediately whenever a team member sends an image generation prompt.

Connected systems

Connected systems

  • Chat trigger interface
  • HTTP image generation API
  • File conversion tools
  • Google Drive
  • Google Sheets
  • Self-hosted n8n

Every workflow is deployed on your own server with documentation, a run log and an error queue.

Workflow architecture

Workflow architecture

  1. 1. When clicking 'Test… (Trigger) (connects to HTTP Request)
  2. 2. HTTP Request (Service and data) (connects to Split Out)
  3. 3. Google Drive (Service and data) (connects to Edit Fields1)
  4. 4. Split Out (Service and data) (connects to Loop Over Items)
  5. 5. Convert to File (Service and data) (connects to Google Drive)
  6. 6. Loop Over Items (Logic and routing) (connects to Aggregate, Edit Fields-file_name)
  7. 7. Edit Fields-file_name (Service and data) (connects to Convert to File)
  8. 8. Edit Fields1 (Service and data) (connects to Google Sheets)
  9. 9. Google Sheets (Service and data) (connects to Loop Over Items)
  10. 10. When chat message received (Trigger) (connects to HTTP Request)
  11. 11. Google Sheets1 (Service and data)
  12. 12. Aggregate (Logic and routing) (connects to Google Sheets1)
  • Trigger
  • AI layer
  • Logic and routing
  • Service and data

Node positions and directed links are generated from the verified catalogue record.

Workflow steps

Workflow steps

  1. 01

    Prompt dispatch and array split

    Chat inputs post over HTTP to the OpenAI image API and split returned image arrays into single items.

  2. 02

    Loop naming and file conversion

    A batch loop assigns consistent file names and converts Base64 payloads into binary image files.

  3. 03

    Google Drive upload and item logging

    Each generated asset uploads to Google Drive while its link and prompt details append to Google Sheets.

  4. 04

    Usage summary aggregation

    Once the loop finishes, aggregated usage metrics append as a summary row in a second Google Sheets tab.

Error queue and human approval

Error queue and human approval

Built-in state in the catalogue workflow

The verified catalogue workflow contains zero node-level error flags across its 12 functional nodes and 12 connections.

Production layer added by ALTAI

During live deployment, ALTAI adds chat user authentication, prompt safety checks, daily generation caps and an API failure retry queue.

Frequently asked

Chat-triggered ChatGPT image generation to Drive and Sheets Frequently asked questions

Yes. Split-out and loop nodes iterate across the full response array so every variation uploads and logs.

Aggregating post-loop keeps token and usage accounting accurate in one summary row rather than repeating per image.

Yes. The filename field step sets dates, project codes or prompt slugs consistently before Drive upload.

Mert Can Gundogdu
The founder takes the call, not a sales team
Next step

We write the proposal after we have found the problem together

In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.

30 minutes · no preparation needed

The call and the week of discovery are both free.Read the terms

Chat on WhatsApp