I want to discuss a task or project
Done! We will get back to you within one business day
Something went wrong. Please try again
Alexander Start:Duck 🦢
@olga_startduck
Write to Telegram
Назад
1k+ участников
Вступить в Telegram
n8n
06.11.2025

Social Media Manager - Automatic social media publishing system via Telegram bot

Process description

Automation is an intelligent Telegram bot manager for publishing content on social networks. The user sends a photo or video to a chat with the bot, after which the AI assistant clarifies the details (post caption and social media selection) in dialogue mode, and then automatically publishes the content through the integration with workflow Auto Posting. The bot has a dialogue memory, which allows you to have a natural conversation and use the context of previous messages.

API keys and services

Telegram Bot API - receiving messages and sending responses

Google Gemini 2.5 API - AI model for dialogue

ImgBB API - image hosting

Cloudinary API - video hosting

N8n Call Workflow - Auto Posting workflow call

System architecture by blocks

SECTION 1: GETTING MEDIA FROM THE USER

1.1 Telegram Trigger — Entry Point

Purpose: Receiving messages from a user in the Telegram bot

Settings: Updates message, Webhook for the bot

1.2 Switch - Classification of incoming content

Purpose: Determining the type of content sent (photo, video or text)

Rules: Photo (images), Video (video), Text (text messages)

SECTION 2: IMAGE PROCESSING

2.1 Get a file - Get a photo file

Purpose: Downloading an image file from Telegram

File ID: taken from message.photo or message.document.thumbnail.file_id

2.2 Get URL - Upload to ImgBB

Purpose: Getting a permanent link to an image via ImgBB hosting

URL: https://api.imgbb.com/1/upload

Result: public image URL

SECTION 3: VIDEO PROCESSING

3.1 Get a file1 - Get a video file

Purpose: Downloading a video file from Telegram

3.2 HTTP Request - Uploading to Cloudinary

Purpose: Getting a permanent link to videos through Cloudinary hosting

URL: https://api.cloudinary.com/v1_1/<ВАШ КЛАУД АЙДИ>/video/upload

IMPORTANT!

In the Cloudinary service, you will need to go to setting=>upload=>upload presets and create a new preset there and select singing mode - unsigned

SECTION 4: AI USER DIALOGUE

4.1 AI Agent — Social Media Manager

Purpose: Intelligent dialogue agent for communicating with the user

Algorithm: Step 1 - Ask for a signature, Step 2 - Refine social networks, Step 3 - Find a link in memory, Step 4 - Call Auto Posting

Agent prompt: You are a social media manager (Instagram, Tiktok, X, Facebook)

The user will send you a photo or video that they want to upload.

First, ask him “What is the signature going to be?” , Then keep your signature and give it one of the parameters.

If the user says they don't need a signature, you skip it.

Then, after the question about the signature, specify which social networks we are posting, if the answer is “to everything”, then upload it to all. If any specific social networks are listed, then only upload them

After you have clarified everything, you must use the Auto Posting tool to upload a photo or video and be sure to send a link to the photo/video to the tool.

COMMUNICATION STEPS:

1. YOU ASK WHAT THE SIGNATURE WILL BE

2. SPECIFY WHICH SOCIAL NETWORKS

3. You take a link that you previously received from your memory (use the think tool to think and find the link in your memory) and make a request to the Auto Posting tool in Russian.

4.2 Google Gemini Chat Model - AI model

Model: Gemini 2.5

4.3 Simple Memory - Dialogue memory

Type: Buffer Window Memory

Allows AI to remember previous posts and media links

4.4 Think — A tool for thinking

Allows AI to find the necessary information in the dialogue memory

4.5 Call Auto posting - Publishing tool

Call workflow Auto Posting for actual publishing (child workflow)

SECTION 5: RESPONSE TO THE USER

5.1 Send a text message - Send a response

Sending a message to a user on Telegram with the result of the publication

Required services and their configuration

Telegram Bot: Create a bot via @BotFather, get Bot Token

Google Gemini: Get an API key through Google AI Studio

ImgBB: Register on Imgbb.com, get an API key

Cloudinary: Register on Cloudinary.com, create Upload Preset

Use cases

Case 1: Posting a photo with a caption

The user sends a photo, the bot asks for a signature and social networks, then publishes

Case 2: Unsigned publication

The user sends a video, replies that a signature is not needed, the bot publishes it on all social networks

Case 3: Memory usage

The bot uses the Think tool to find the signature from the previous conversation

Practical value

For content creators: Publish on social media directly from the messenger, the history of all posts in one place

For SMM teams: Centralized management of publications via Telegram, quick response to relevant topics

For small businesses: A simple tool without complicated training, publish from your phone in a minute

The result of the system

This automation is a personal AI assistant to an SMM manager on Telegram. The combination of natural dialogue through Gemini, context memory, and integration with the publishing system creates a convenient interface for social media management. The user gains experience with a real manager who understands the context, asks clarifying questions and makes publications automatically.

Child workflow:

Process description

Automation for publishing photo and video content to social networks using AI query processing. The system receives a command from the user, analyzes it through OpenAI, determines which social networks to use, generates a signature for the publication and automatically uploads media via the Blotato API. The whole process from getting a command to publishing takes a few seconds, fully automating the routine work of an SMM manager.

API keys and services

Blotato API - social media publishing (TikTok, Instagram, Twitter/X)

OpenAI API - GPT-4.1-mini for team analysis

N8n Execute Workflow Trigger — Launch Entry Point

System architecture by blocks

SECTION 1: RECEIVING AND PROCESSING A COMMAND

1.1 When Executed by Another Workflow - Entry Point

Purpose: Getting a command from an external workflow for processing

Settings: Input query parameter (any data type)

An example of an incoming command: “Post a photo with the caption 'Mug' on Tiktok and Instagram. Link to the photo: https://i.ibb.co/m59P2Tz9/file-1.jpg”

1.2 AI Agent — Team Analysis

Purpose: OpenAI analyzes the user's team and extracts structured data

Model: gpt-4.1-mini

Prompt: You will receive a command. Send only a variable with a signature and social networks in Russian as a dry answer without further comments. Also, send a link to the photo/video in a separate variable.

1.3 Structured Output Parser - Parsing a response

Purpose: Converting an AI response into structured JSON

Schema: Signature (text), Link (url), Social networks (array of names)

SECTION 2: ACCOUNT SETUP AND PREPARATION

2.1 Set Accounts - Configuration

Purpose: Setting account IDs and API keys for each social network

Settings: blotato_api_key, instagram_id, tiktok_id, facebook_id, twitter_id, and other platforms

video_caption: taken from an AI response (Signature parameter)

2.2 Upload — Uploading media to Blotato

Purpose: Uploading photos/videos to the Blotato system for further publication

URL: https://backend.blotato.com/v2/media

Result: getting an internal URL in the Blotato system

SECTION 3: SOCIAL MEDIA DISTRIBUTION

3.1 Switch - Routing

Purpose: Determining which social networks to publish on the basis of AI analysis

Rule 1: If the social network array contains Tiktok, send it to TIKTOK

Rule 2: If “Instagram” is contained, send it to Instagram

Rule 3: If you have “Twitter”, send it to X

Section 4: POST TO EVERY NETWORK4.1 TIKTOK/Instagram/X — Publish

Purpose: Creating a post through the Blotato API

URL: https://backend.blotato.com/v2/posts

Body JSON: post with target, content (text, platform, mediaURLS) and accountID settings

In Body:

Required services and their configuration

Blotato: Register on Blotato.com, get an API key, connect social networks

OpenAI: API key with access to GPT-4.1-mini

Use cases

Case 1: Publishing to one network

Login: “Post this photo to Instagram with the caption 'New of the Season'. Link: https://example.com/photo.jpg”

Result: Posting only on Instagram with the specified caption

Case 2: Multiplatform publishing

Login: “Upload the video to all social networks with the text 'See what happened'. Link: https://example.com/video.mp4”

Result: Posting to TikTok, Instagram, and Twitter/X at the same time

Practical value

For SMM managers: Saving time on routine publications, ability to manage through simple commands, multi-account management

For small businesses: An easy way to maintain a social media presence, no need to know each platform's API

For agencies: Scaling publications for multiple clients, centralized management

The result of the system

This automation is an intelligent content publisher that understands natural language and automatically distributes posts across social media. Using AI for team analysis makes the system flexible and convenient, and integration with the Blotato API ensures reliable publishing on all major social platforms.

Читайте также

No items found.

write to us and we will show you the way to efficiency