Google Sheets + Drive for consistent AI images
You finally get a great AI image… then you can’t recreate it. The face drifts, the styling changes, and you’re back to digging through random downloads trying to figure out what prompt or version you used last.
Marketing managers feel it when a “consistent character” campaign turns into a guessing game. A content creator hits the same wall building an influencer-style feed. And an agency lead? They get to explain to a client why the “same person” looks different every post. This AI image automation fixes the messy middle.
You’ll see how the workflow generates prompts, creates images with references, upscales the final, then files everything neatly in Google Drive while Google Sheets tracks each stage so nothing gets lost.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: Google Sheets + Drive for consistent AI images
flowchart LR
subgraph sg0["Manual Run Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Manual Run Trigger", pos: "b", h: 48 }
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Build Folder Name"]
n2@{ icon: "mdi:cog", form: "rounded", label: "Generate Drive Folder", pos: "b", h: 48 }
n3@{ icon: "mdi:database", form: "rounded", label: "Create Spreadsheet File", pos: "b", h: 48 }
n4@{ icon: "mdi:cog", form: "rounded", label: "Relocate Sheet File", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Initialize Sheet Fields", pos: "b", h: 48 }
n6@{ icon: "mdi:database", form: "rounded", label: "Append Sheet Columns", pos: "b", h: 48 }
n7@{ icon: "mdi:robot", form: "rounded", label: "Narrative Prompt Builder", pos: "b", h: 48 }
n8@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Mini", pos: "b", h: 48 }
n9@{ icon: "mdi:robot", form: "rounded", label: "Parse Prompt Schema", pos: "b", h: 48 }
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Clean Prompt Text"]
n11@{ icon: "mdi:database", form: "rounded", label: "Update Story Status", pos: "b", h: 48 }
n12["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Submit Image Task"]
n13@{ icon: "mdi:swap-vertical", form: "rounded", label: "Store Task Identifier", pos: "b", h: 48 }
n14@{ icon: "mdi:cog", form: "rounded", label: "Pause One Minute", pos: "b", h: 48 }
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Check Task Status"]
n16@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Route Task State", pos: "b", h: 48 }
n17["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Extract Result Links"]
n18["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Request Upscale Job"]
n19@{ icon: "mdi:swap-vertical", form: "rounded", label: "Store Upscale TaskId", pos: "b", h: 48 }
n20@{ icon: "mdi:cog", form: "rounded", label: "Pause For Upscale", pos: "b", h: 48 }
n21["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Fetch Upscale Result"]
n22@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Route Upscale State", pos: "b", h: 48 }
n23["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Extract Upscale Links"]
n24["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Download Image Binary"]
n25@{ icon: "mdi:cog", form: "rounded", label: "Upload Image File", pos: "b", h: 48 }
n26@{ icon: "mdi:cog", form: "rounded", label: "Move Image Assets", pos: "b", h: 48 }
n27@{ icon: "mdi:database", form: "rounded", label: "Update Image Record", pos: "b", h: 48 }
n10 --> n11
n16 --> n12
n16 --> n14
n16 --> n17
n22 --> n18
n22 --> n19
n22 --> n23
n15 --> n16
n6 --> n7
n24 --> n25
n4 --> n5
n13 --> n14
n14 --> n15
n5 --> n6
n1 --> n2
n26 --> n27
n25 --> n26
n20 --> n21
n9 -.-> n7
n2 --> n3
n18 --> n19
n17 --> n18
n3 --> n4
n21 --> n22
n8 -.-> n7
n7 --> n10
n11 --> n12
n19 --> n20
n12 --> n13
n23 --> n24
n0 --> n1
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n7,n9 ai
class n8 aiModel
class n16,n22 decision
class n3,n6,n11,n27 database
class n12,n15,n18,n21,n24 api
class n1,n10,n17,n23 code
classDef customIcon fill:none,stroke:none
class n1,n10,n12,n15,n17,n18,n21,n23,n24 customIcon
The Challenge: Consistent AI Images Without the Chaos
Creating “the same person” across multiple AI images sounds simple until you do it at scale. One day it’s a perfect portrait, the next day the jawline changes, the outfit shifts, and the lighting feels like a different photoshoot. Then comes the admin work: downloading files, renaming them, uploading to Drive, and trying to remember which prompt produced which result. Even if you’re careful, one missed step means you can’t reproduce a winning image when you need another variation.
The friction compounds. Here’s where it breaks down most often.
- You rely on “prompt memory” and scattered notes, so recreating a style later is hit-or-miss.
- Image versions pile up in Downloads and Drive with inconsistent names, which makes review and approval painfully slow.
- Manual status tracking (or none at all) leads to duplicate runs, missed failures, and wasted API spend.
- Upscaling and face cleanup become a separate workflow, so the “final” file is rarely where the team expects it.
The Fix: A Tracked, Organized AI Image Pipeline
This workflow turns AI image creation into something you can run repeatedly without crossing your fingers. It starts with a manual trigger, then creates a timestamped folder in Google Drive so each run has a clean home. Next, OpenAI (GPT-4 mini) generates a structured, detailed prompt from your narrative template, which is cleaned and prepared for image generation. The workflow submits that prompt plus five reference images to Kie.ai’s google/nano-banana-edit model, then automatically checks the job status until results are ready. When the image is generated, it immediately kicks off a 4x upscale using nano-banana-upscale with face enhancement, downloads the finished image, uploads it to the right Drive folder, and updates Google Sheets with statuses and URLs so your team always knows what’s done.
The workflow begins when you run it in n8n and it creates your Drive + Sheets “project space.” From there, AI builds the prompt, Kie.ai generates the image and upscales it, and Google Sheets becomes the living status board with links to the final file in Drive.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you generate 10 influencer-style images for a weekly content pack. Manually, you’ll usually spend about 10 minutes per image on “everything around the image” (naming, filing, status updates, grabbing links), which is roughly 1.5 hours of pure admin. Add upscaling and face touch-ups and you can lose another hour. With this workflow, you trigger once, wait for generation and upscale, and then your Sheet already has the status and the Drive URL. You get the time back without lowering quality.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Drive for timestamped folders and file storage
- Google Sheets to track statuses and image links
- Kie.ai API key (get it from your Kie.ai dashboard)
- OpenAI API key (get it from the OpenAI platform dashboard)
Skill level: Intermediate. You’ll connect accounts, paste API keys, and adjust a few text fields safely.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A manual run kicks things off. In n8n, you start the workflow when you’re ready to generate a new “set” of images. This is easy to swap later for a form submission, a webhook, or a schedule.
Drive and Sheets get prepared automatically. The workflow builds a timestamped folder name, creates that folder in Google Drive, then creates a Google Sheet (and moves it into the right Drive location) so every run is organized from the first second.
AI writes a usable prompt, not a vague idea. OpenAI generates a structured narrative prompt using your template, then the workflow cleans it so it’s ready to send to Kie.ai. A status update is written to Google Sheets so you can see “story ready” before image generation begins.
Kie.ai generates, the workflow monitors, then upscales. n8n submits the job to the nano-banana edit model with your five reference images, checks status with retry logic, then starts the 4x upscale job with face enhancement once the base image is ready.
The final image is filed and linked. The workflow downloads the upscaled image, uploads it to the correct Google Drive folder, moves any supporting assets, and updates the Google Sheet row with the final URLs and statuses.
You can easily modify the prompt template to match a different brand voice or visual style based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
This workflow starts manually and generates a new folder + spreadsheet for each run.
- Add and keep Manual Run Trigger as the starting node.
- Connect Manual Run Trigger to Build Folder Name as shown in the workflow.
Step 2: Connect Google Drive & Google Sheets
These nodes create and organize the Drive folder and spreadsheet, then initialize your sheet structure.
- Open Generate Drive Folder and set Name to
{{ $json.folderName }}. Credential Required: Connect your googleDriveOAuth2Api credentials. - In Create Spreadsheet File, set Title to
{{ $json.name }}and keep Resource asspreadsheet. Credential Required: Connect your googleSheetsOAuth2Api credentials. - Configure Relocate Sheet File with Operation set to
move, File ID set to{{ $json.spreadsheetId }}, and Folder ID to{{ $('Generate Drive Folder').item.json.id }}. Credential Required: Connect your googleDriveOAuth2Api credentials. - In Initialize Sheet Fields, keep the fields for Prompt, Temp Image Url, and Status as empty strings.
- In Append Sheet Columns, keep Operation as
append, Sheet ID as{{ $('Create Spreadsheet File').item.json.sheets[0].properties.sheetId }}, and Document ID as{{ $('Create Spreadsheet File').item.json.spreadsheetId }}. Credential Required: Connect your googleSheetsOAuth2Api credentials.
⚠️ Common Pitfall: Make sure the Folder ID and Drive location in Generate Drive Folder and Relocate Sheet File point to the same parent folder so files end up together.
Step 3: Set Up AI Prompt Generation
The prompt builder uses OpenAI and a structured output parser before cleaning the result.
- Open Narrative Prompt Builder and keep Prompt Type as
definewith the provided message text. - Ensure OpenAI Chat Mini is connected as the language model for Narrative Prompt Builder. Credential Required: Connect your openAiApi credentials.
- Keep Parse Prompt Schema configured with the example JSON schema. This is an AI sub-node—credentials must be added to OpenAI Chat Mini, not to Parse Prompt Schema.
- Leave Clean Prompt Text code as-is to normalize escaped characters and whitespace.
- In Update Story Status, set Prompt to
{{ $json.prompt }}, Status toprompt created, and row_number to2. Credential Required: Connect your googleSheetsOAuth2Api credentials.
⚠️ Common Pitfall: If the prompt output looks empty, verify Narrative Prompt Builder has hasOutputParser enabled and that Parse Prompt Schema is connected as the output parser.
Step 4: Configure Image Task Submission & Polling
These nodes submit the image generation request, store the task ID, and poll until the result is ready.
- In Submit Image Task, set URL to
https://api.kie.ai/api/v1/jobs/createTaskand keep the JSON body using{{ $json.Prompt }}. Add your API token in the Authorization header asBearer [CONFIGURE_YOUR_TOKEN]. - In Store Task Identifier, keep taskId set to
{{ $json.data.taskId }}and Keep Only Set enabled. - Set Pause One Minute to Unit
minutesto throttle polling. - In Check Task Status, set URL to
https://api.kie.ai/api/v1/jobs/recordInfoand taskId query to{{ $('Store Task Identifier').item.json.taskId }}. Add the same Authorization header. - Configure Route Task State rules to match
{{ $json.data.state }}and{{ $json.data.resultJson }}for fail, pending, and success states.
⚠️ Common Pitfall: The HTTP Request nodes do not use n8n credentials. You must manually provide the API token in each node’s Authorization header.
Step 5: Configure Upscale, Download, and Drive Storage
Once the generation task succeeds, the workflow upscales the image, downloads the output, and stores it in Drive.
- In Extract Result Links, keep the code that parses
resultJsonintoresultUrls. - In Request Upscale Job, set URL to
https://api.kie.ai/api/v1/jobs/createTaskand keep image mapped to{{ $json.resultUrls[0] }}with the authorization header. - In Store Upscale TaskId, keep taskId set to
{{ $json.data.taskId }}and Keep Only Set enabled. - Set Pause For Upscale to Unit
minutesand confirm Fetch Upscale Result uses{{ $json.taskId }}as the query parameter. - Ensure Route Upscale State uses the same success/fail logic on
{{ $json.data.state }}and{{ $json.data.resultJson }}. - In Extract Upscale Links, keep the code that maps
resultUrlsfor downstream use. - In Download Image Binary, set URL to
{{ $json.resultUrls }}to fetch the binary. - In Upload Image File, set Name to
{{ $('Store Upscale TaskId').item.json.taskId }}. Credential Required: Connect your googleDriveOAuth2Api credentials. - In Move Image Assets, set Operation to
moveand Folder ID to{{ $('Generate Drive Folder').item.json.id }}. Credential Required: Connect your googleDriveOAuth2Api credentials. - In Update Image Record, set Temp Image Url to
{{ $('Download Image Binary').item.json.resultUrls[0] }}, Status toimage created, and row_number to2. Credential Required: Connect your googleSheetsOAuth2Api credentials.
Step 6: Test and Activate Your Workflow
Validate end-to-end execution before enabling the workflow for ongoing use.
- Click Execute Workflow to run Manual Run Trigger and monitor each node’s output.
- Confirm a new Drive folder is created by Generate Drive Folder and the spreadsheet is created and moved by Create Spreadsheet File and Relocate Sheet File.
- Verify the sheet row updates in Update Story Status and Update Image Record show
prompt createdandimage created. - Check that Upload Image File and Move Image Assets place the final image in the same folder as the spreadsheet.
- When everything succeeds, toggle the workflow Active to use it in production.
Watch Out For
- Google Drive credentials can expire or need specific permissions. If things break, check the Google connection inside n8n’s Credentials screen first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Common Questions
About an hour if you already have your API keys and Google access ready.
Yes, but you’ll want one careful setup pass. After that, running it is basically “trigger and wait,” with progress visible in Google Sheets.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs and Kie.ai generation/upscale usage (usually a small per-image cost).
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
You can. The quickest wins are inside the prompt-building portion (the “Narrative Prompt Builder” and the OpenAI chat node), because that’s where your style rules live. Many teams customize three things: the prompt template (brand voice, camera style, wardrobe rules), the reference image set (different “character packs”), and the output naming (so Drive filenames match your campaign structure). If you want to swap providers, you can replace the Kie.ai HTTP Request nodes with another image API while keeping the same Google Sheets tracking.
Usually it’s expired Google OAuth access or the wrong account was connected. Reconnect Google Drive in n8n Credentials, then confirm the Drive permissions allow file creation and moving files between folders. If the workflow creates the folder but fails on uploads, check the target folder ID and make sure your Drive isn’t in a restricted Shared Drive without proper rights. Finally, look at the exact node error in the execution log because Google will often tell you which permission is missing.
On n8n Cloud’s entry plans, you can typically run thousands of executions per month, which is plenty for most small teams. If you self-host, there’s no execution cap and capacity mostly depends on your server and how long each Kie.ai job takes. In practice, this workflow is gated by external processing time, not n8n speed, so scaling means running more jobs in parallel and watching API rate limits.
Often, yes. This workflow relies on multi-stage status polling, branching (Switch/If), and retry handling, and frankly that gets awkward fast in many no-code tools. n8n also gives you the option to self-host for unlimited runs, which matters when you start generating lots of variations. Zapier or Make can be fine for a simple “submit prompt, save file” flow, but they tend to get expensive or fragile once you add waits, re-check loops, and file management in Drive. If you want a second opinion on tool choice, Talk to an automation expert.
You don’t need more “cool AI tools.” You need a repeatable system that produces consistent images and keeps your files and links clean. Set this up once, and let Google Sheets and Drive do the remembering.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.