Automation library · Research and reporting

AI-powered Meta ads analysis & creation with Gemini

Started by an event in a connected app, and works across Google Drive and Google Sheets. It hands the judgement calls to OpenAI. 49 steps, 4 branches, 3 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

49 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
3Loops or waits
2Services it connects to

The flow

Starts it 2Model 6Logic 11Service 30

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

  1. 1OpenAI Chat ModelLm Chat Open AiModel
  2. 2Structured Output ParserOutput Parser StructuredModel
  3. 3OpenAI Chat Model1Lm Chat Open AiModel
  4. 4Structured Output Parser1Output Parser StructuredModel
  5. 5When clicking ‘Test workflow’Manual triggerStarts it
  6. 6Google Drive Folder UpdatedGoogle Drive triggerStarts it
  7. 7AI AgentAgentModel
  8. 8AI Agent1AgentModel
  9. 9Get Ads to ProcessGoogle SheetsService
  10. 10Get SettingsGoogle SheetsService
  11. 11Fetch All FilesGoogle DriveService
  12. 12Save Video Analysis OutputGoogle SheetsService
  13. 13Save Image Analysis OutputGoogle SheetsService
  14. 14Filter Unprocessed AdsFilterLogic
  15. 15MergeMergeLogic
  16. 16Get Files MetadataHttp RequestService
  17. 17Video or Image AssetSwitchLogic
  18. 18Extract File SpecsSetLogic
  19. 19Get VideoHttp RequestService
  20. 20Get image 1Http RequestService
  21. 21Create AssetGoogle SheetsService
  22. 22Upload Ad VideoFacebook Graph ApiService
  23. 23Upload Ad ImageFacebook Graph ApiService
  24. 24Get All RowsGoogle SheetsService
  25. 25WaitWaitLogic
  26. 26Check if two or one imageIfLogic
  27. 27AI Description is EmptyFilterLogic
  28. 28Get Video Preview ImageFacebook Graph ApiService
  29. 29Get image Http RequestService
  30. 30Create Image CreativeFacebook Graph ApiService
  31. 31Get File MetadataHttp RequestService
  32. 32Create Video Ad CreativeFacebook Graph ApiService
  33. 33Upload Second Ad ImageFacebook Graph ApiService
  34. 34Create Image AdFacebook Graph ApiService
  35. 35Video or ImageSwitchLogic
  36. 36Create Video AdFacebook Graph ApiService
  37. 37Create Multiple Image CreativeFacebook Graph ApiService
  38. 38Facebook Graph APIFacebook Graph ApiService
  39. 39Gemini - Generate Upload URLHttp RequestService
  40. 40Google DriveGoogle DriveService
  41. 41Save Video Ad DetailsGoogle SheetsService
  42. 42Save Image Ad DetailsGoogle SheetsService
  43. 43Download from Google DriveGoogle DriveService
  44. 44Gemini - Upload FileHttp RequestService
  45. 45Wait 3 SecondsWaitLogic
  46. 46Check StateHttp RequestService
  47. 47IfIfLogic
  48. 48Analyze Video with GeminiHttp RequestService
  49. 49Wait 2 SecondsWaitLogic

How it's built

Starts on
An event in a connected app
Steps
49, with 4 branches, 3 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Google Sheets
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on an event in a connected app.

Does it use AI?

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

How long does it take to set up?

Take your time. At 49 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 49 steps before you point it at anything that matters.