Automation library · Data collection

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.

LargeCalls a model: Grok, OpenAI

34 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
3Loops or waits
1Service it connects to

The flow

Starts it 2Model 11Logic 11Service 10

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

  1. 1Schedule TriggerSchedule triggerStarts it
  2. 2Grok Model – Prompt GenerationLm Chat XAi GrokModel
  3. 3Build ComfyUI PayloadCodeLogic
  4. 4Authenticate ComfyUI APIHttp RequestService
  5. 5Split JobsSplit OutLogic
  6. 6Send Job to ComfyUIHttp RequestService
  7. 7Download Generated ImageHttp RequestService
  8. 8Process Image DataCodeLogic
  9. 9Split Image ResultsSplit OutLogic
  10. 10Analyze Image with OpenAI VisionOpen AiModel
  11. 11Grok Model – Video PromptLm Chat XAi GrokModel
  12. 12Parse Video Prompt OutputOutput Parser StructuredModel
  13. 13Grok Model – Script RefinementLm Chat XAi GrokModel
  14. 14Grok Model – Caption GenerationLm Chat XAi GrokModel
  15. 15Parse Caption OutputOutput Parser StructuredModel
  16. 16When clicking ‘Execute workflow’Manual triggerStarts it
  17. 17Generate ComfyUI PromptAgentModel
  18. 18Generate Video PromptAgentModel
  19. 19Refine Video ScriptAgentModel
  20. 20Evaluate AI ImagesAgentModel
  21. 21Get Pending Jobs from Google SheetGoogle SheetsService
  22. 22Prepare Kling PayloadCodeLogic
  23. 23Send Video Job to KlingHttp RequestService
  24. 24Has Pending Jobs?IfLogic
  25. 25Generate ImageHttp RequestService
  26. 26Wait for Kling ProcessingWaitLogic
  27. 27Loop Over JobsSplit In BatchesLogic
  28. 28Wait for ComfyUI ProcessingWaitLogic
  29. 29Poll Kling for Video ResultHttp RequestService
  30. 30Check ComfyUI Job StatusHttp RequestService
  31. 31Video Ready?IfLogic
  32. 32Job Complete?IfLogic
  33. 33Update Job Status in Google SheetGoogle SheetsService
  34. 34Fetch ComfyUI ResultHttp RequestService

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.