Automation library · Content

Create short-form videos from X posts with Gemini

Started by an incoming Telegram message, and works across Google Cloud Storage and Telegram. It hands the judgement calls to Gemini and OpenAI. 20 steps, 2 loops or waits: a working afternoon to understand properly.

MediumCalls a model: Gemini, OpenAI

20 stepsMedium: a working afternoon
0Branches: places the flow splits
2Loops or waits
2Services it connects to

The flow

Starts it 1Model 2Logic 6Service 11

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

  1. 1Telegram TriggerTelegram triggerStarts it
  2. 2Prepare Video for StorageConvert To FileService
  3. 3Extract Tweet IDCodeLogic
  4. 4Upload Video to GCSGoogle Cloud StorageService
  5. 5Fetch Tweet DataHttp RequestService
  6. 6Request Captions RenderHttp RequestService
  7. 7Select Best Video QualityCodeLogic
  8. 8Wait for RenderingWaitLogic
  9. 9Analyze Video with GeminiGoogle GeminiModel
  10. 10Check Rendering StatusHttp RequestService
  11. 11Analyze with OpenAIOpen AiModel
  12. 12Download Final VideoHttp RequestService
  13. 13Format LLM OutputCodeLogic
  14. 14Send Repurposed VideoTelegramService
  15. 15Define ConstantsSetLogic
  16. 16Generate Google JWTJwtService
  17. 17Get Auth TokenHttp RequestService
  18. 18Generate Veo VideoHttp RequestService
  19. 19Wait for Veo GenerationWaitLogic
  20. 20Fetch Veo StatusHttp RequestService

How it's built

Starts on
An incoming Telegram message
Steps
20, 2 loops or waits
Size
Medium: a working afternoon
Connects to
Google Cloud Storage, Telegram
Model
Gemini, OpenAI

Questions

What does it need to run?

An n8n account, plus your own Google Cloud Storage 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. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 20 steps is enough that you should read each one before running it.

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 20 steps before you point it at anything that matters.