Skip to main content

Publish LinkedIn & X posts with Telegram Bot, Gemini AI & Vector Memory

Workflow preview

Workflow preview
100%
Publish LinkedIn & X posts with Telegram Bot, Gemini AI & Vector Memory preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow contains community nodes that are only compatible with the self hosted version of n8n. Overview This is a Telegram Bot capable of receiving information from the user in the form of te...

Best for

  • Social Media automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.set, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.embeddingsgooglegemini, n8n-nodes-base.telegram, n8n-nodes-base.twittertool

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Gregory.

Original n8n.io source

1.1 Workflow description

Title
Publish LinkedIn & X posts with Telegram Bot, Gemini AI & Vector Memory
Workflow name
Publish LinkedIn & X posts with Telegram Bot, Gemini AI & Vector Memory

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Overview

This is a Telegram Bot capable of receiving information from the user in the form of text messages, voice messages, images or documents (e.g., presentations, PDFs, HTML pages), and publishing posts to the user's social platforms.

The bot always sends the user a draft of the post for verification before publishing it.

The bot saves relevant information to its long-term memory (vector store), so you don't need to repeat it in every interaction (e.g., who you are, your company, product, etc.).

This template supports creating posts in LinkedIn and X.

Setup

Requirements

To use this template your will need:

  1. Google's AI Studio API key. Get one here: https://aistudio.google.com/app/apikey
  2. Telegram Bot API key. You receive one when you register a new Telegram Bot via @BotFather bot in Telegram.
  3. LinkedIn API key. Follow the instructions here to create one: https://docs.n8n.io/integrations/builtin/credentials/linkedin/
  4. X API key. Follow the instructions here to create one: https://docs.n8n.io/integrations/builtin/credentials/twitter/

Step-by-step instruction

  1. Import this template
  2. Create a new Telegram Bot or get an API key for existing one.
  3. Configre Telegram nodes with Telegram API key.
  4. Obtain a Google's AI Studio API key. Set it in "Describe document", "Describe audio" and "Google Gemini Chat Model".
  5. Create an API key for LinkedIn.
  6. Create an API key for X.
  7. Set our LinkedIn key in "Create post in LinkedIn" nodes.
  8. Set your X key in "Create X (Twitter) post" node.

Other

Bright-colored notes in the template highlight information that needs to be set before launching the template.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 2 - Set input context

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Text prompt

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Document prompt

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Describe audio

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - Audio prompt

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 8 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 9 - Embeddings Google Gemini

Type / Role
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - embeddingsGoogleGemini
Config choices
Version 1

Block 10 - Send response

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 11 - Create X (Twitter) post

Type / Role
n8n-nodes-base.twitterTool - twitterTool
Config choices
Version 2

Block 12 - Chat Memory Manager

Type / Role
@n8n/n8n-nodes-langchain.memoryManager - memoryManager
Config choices
Version 1.1

Block 13 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 14 - Error

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 15 - Success

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 16 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 17 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 18 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Split agent's response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 23 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Input type switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Showing the first 24 of 36 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Publish LinkedIn & X posts with Telegram Bot, Gemini AI & Vector Memory
Complexity advanced
Nodes 36
Categories Social Media, AI Chatbot
Author Gregory
Published 18 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6148/6148.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Publish LinkedIn & X posts with Telegram Bot, Gemini AI & Vector Memory do?

This workflow contains community nodes that are only compatible with the self hosted version of n8n. Overview This is a Telegram Bot capable of receiving information from the user in the form of te...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, AI Chatbot use case.