Automation library · Content

Publish LinkedIn & X posts with Telegram Bot and Gemini

Started by an incoming Telegram message, and works across Telegram and in-memory vectors. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 28 steps, 2 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: GeminiRetrieval

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

The flow

Starts it 1Model 7Logic 8Service 12

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

  1. 1Telegram TriggerTelegram triggerStarts it
  2. 2Google Gemini Chat ModelLm Chat Google GeminiModel
  3. 3Embeddings Google GeminiEmbeddings Google GeminiModel
  4. 4Create X (Twitter) postTwitter ToolService
  5. 5Simple MemoryMemory Buffer WindowModel
  6. 6Create post in LinkedIn as a companyLinked In ToolService
  7. 7Create post in LinkedIn as a personLinked In ToolService
  8. 8Save knowledgeTool WorkflowModel
  9. 9Set input contextSetLogic
  10. 10AI AgentAgentModel
  11. 11Retrieve knowledgeVector Store In MemoryModel
  12. 12Chat Memory ManagerMemory ManagerModel
  13. 13Input type switchSwitchLogic
  14. 14Split agent's responseCodeLogic
  15. 15SuccessTelegramService
  16. 16Text promptSetLogic
  17. 17Download documentTelegramService
  18. 18Download audioTelegramService
  19. 19IfIfLogic
  20. 20Split OutSplit OutLogic
  21. 21Encode documentExtract From FileService
  22. 22Encode audioExtract From FileService
  23. 23ErrorTelegramService
  24. 24Send responseTelegramService
  25. 25Describe documentHttp RequestService
  26. 26Describe audioHttp RequestService
  27. 27Document promptSetLogic
  28. 28Audio promptSetLogic

How it's built

Starts on
An incoming Telegram message
Steps
28, with 2 branches
Size
Large: read it before trusting it with anything live
Connects to
Telegram, in-memory vectors
Model
Gemini
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 Telegram and in-memory vectors accounts, and a key for Gemini. 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. 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 28 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 28 steps before you point it at anything that matters.