# Generate FLUX image prompts from Google Sheets with RunComfy: n8n workflow

> Started by a clock, and works across Google Sheets. It hands the judgement calls to Grok and OpenAI.

Source: https://millionrounds.com/workflow/generate-flux-image-prompts-from-google-sheets-with-runcomfy (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Data collection](https://millionrounds.com/workflows?category=Data+collection#library)

# Generate FLUX image prompts from Google Sheets with RunComfy

Started by a clock, and works across Google Sheets. It hands the judgement calls to Grok and OpenAI. 34 steps, 3 branches, 3 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Grok, OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fgenerate-flux-image-prompts-from-google-sheets-with-runcomfy)

**34 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**3** Loops or waits

**1** Service it connects to

## The flow

Starts it 2 Model 11 Logic 11 Service 10

The steps in the order they run, from what starts it.

- 1 **Schedule Trigger** Schedule trigger *Starts it*
- 2 **Grok Model – Prompt Generation** Lm Chat XAi Grok *Model*
- 3 **Build ComfyUI Payload** Code *Logic*
- 4 **Authenticate ComfyUI API** Http Request *Service*
- 5 **Split Jobs** Split Out *Logic*
- 6 **Send Job to ComfyUI** Http Request *Service*
- 7 **Download Generated Image** Http Request *Service*
- 8 **Process Image Data** Code *Logic*
- 9 **Split Image Results** Split Out *Logic*
- 10 **Analyze Image with OpenAI Vision** Open Ai *Model*
- 11 **Grok Model – Video Prompt** Lm Chat XAi Grok *Model*
- 12 **Parse Video Prompt Output** Output Parser Structured *Model*
- 13 **Grok Model – Script Refinement** Lm Chat XAi Grok *Model*
- 14 **Grok Model – Caption Generation** Lm Chat XAi Grok *Model*
- 15 **Parse Caption Output** Output Parser Structured *Model*
- 16 **When clicking ‘Execute workflow’** Manual trigger *Starts it*
- 17 **Generate ComfyUI Prompt** Agent *Model*
- 18 **Generate Video Prompt** Agent *Model*
- 19 **Refine Video Script** Agent *Model*
- 20 **Evaluate AI Images** Agent *Model*
- 21 **Get Pending Jobs from Google Sheet** Google Sheets *Service*
- 22 **Prepare Kling Payload** Code *Logic*
- 23 **Send Video Job to Kling** Http Request *Service*
- 24 **Has Pending Jobs?** If *Logic*
- 25 **Generate Image** Http Request *Service*
- 26 **Wait for Kling Processing** Wait *Logic*
- 27 **Loop Over Jobs** Split In Batches *Logic*
- 28 **Wait for ComfyUI Processing** Wait *Logic*
- 29 **Poll Kling for Video Result** Http Request *Service*
- 30 **Check ComfyUI Job Status** Http Request *Service*
- 31 **Video Ready?** If *Logic*
- 32 **Job Complete?** If *Logic*
- 33 **Update Job Status in Google Sheet** Google Sheets *Service*
- 34 **Fetch ComfyUI Result** Http Request *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 34, with 3 branches, 3 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets
- **Model:** Grok, OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Google Sheets account, and a key for Grok and OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls Grok and OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 34 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 34 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fgenerate-flux-image-prompts-from-google-sheets-with-runcomfy)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)

## Workflows like it

Also data collection, with the same services where possible, closest in size first.

- [**Build a Google Drive internal knowledge base with OpenAI** 34 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/build-a-google-drive-internal-knowledge-base-with-openai)
- [**Automatic YouTube shorts generator with Google Cloud Storage** 34 steps · Google Cloud Storage, Google Sheets](https://millionrounds.com/workflow/automatic-youtube-shorts-generator-with-google-cloud-storage)
- [**24/7 shorts automation system for busy people with OpenRouter** 33 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/24-7-shorts-automation-system-for-busy-people-with-openroute)
- [**Manage finances, tasks, tweets and Gmail with OpenAI** 33 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/manage-finances-tasks-tweets-and-gmail-with-openai)
- [**AI-powered auto-generate exam questions** 32 steps · calls a model · Google Docs, Google Sheets](https://millionrounds.com/workflow/ai-powered-auto-generate-exam-questions)
- [**Auto-generate product comparison pages with OpenAI** 32 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/auto-generate-product-comparison-pages-with-openai)
