Automation library · Content

Generate AI photos with Gemini and Instagram

Started by an incoming Telegram message, and works across Google Drive, Google Sheets and Telegram. It puts Gemini and OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 44 steps, 9 branches, 6 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini, OpenAIRetrieval

44 stepsLarge: read it before trusting it with anything live
9Branches: places the flow splits
6Loops or waits
3Services it connects to

The flow

Starts it 1Model 5Logic 17Service 21

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

  1. 1OpenAI Chat ModelLm Chat Open AiModel
  2. 2Listen for incoming eventsTelegram triggerStarts it
  3. 3Window Buffer MemoryMemory Buffer WindowModel
  4. 4AI AgentAgentModel
  5. 5Voice or TextSetLogic
  6. 6Approved from user?IfLogic
  7. 7A Voice?IfLogic
  8. 8Parse AI OutputCodeLogic
  9. 9Send questions or proposal to userTelegramService
  10. 10Get Voice FileTelegramService
  11. 11Inform user about processingTelegramService
  12. 12Speech to TextOpen AiModel
  13. 13Save Prompt & Post-TextGoogle SheetsService
  14. 14Generate an imageGoogle GeminiModel
  15. 15Upload image1Google DriveService
  16. 16Send a photo messageTelegramService
  17. 17Download image from DriveGoogle DriveService
  18. 18Send message and wait for responseTelegramService
  19. 19If1IfLogic
  20. 20Upload media1BlotatoService
  21. 21Create instagram PostBlotatoService
  22. 22Create x postBlotatoService
  23. 23Create FB postBlotatoService
  24. 24Wait1WaitLogic
  25. 25WaitWaitLogic
  26. 26Wait2WaitLogic
  27. 27Get post1BlotatoService
  28. 28Check Post StatusBlotatoService
  29. 29Check Post Status1BlotatoService
  30. 30Published to Instagram?IfLogic
  31. 31Published to X?IfLogic
  32. 32Published to Facebook ?IfLogic
  33. 33Confirm publishing to InstagramTelegramService
  34. 34In Progress?1IfLogic
  35. 35Confirm publishing to XTelegramService
  36. 36In Progress?IfLogic
  37. 37Confirm publishing to FacebookTelegramService
  38. 38In Progress?2IfLogic
  39. 39Give Blotat more timeWaitLogic
  40. 40Send Instagram Error MessageTelegramService
  41. 41Give Blotat other 5s :)WaitLogic
  42. 42Send X Error MessageTelegramService
  43. 43Give Blotat other 5s :)1WaitLogic
  44. 44Send Facebook Error MessageTelegramService

How it's built

Starts on
An incoming Telegram message
Steps
44, with 9 branches, 6 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Google Sheets, Telegram
Model
Gemini, OpenAI
Retrieval
Answers are drawn from documents you supply, not from the model alone

Questions

What does it need to run?

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

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

Yes. It calls Gemini and OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

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