Vktgbot
πΊπ¦ Telegram Bot for reposting from VKontakte to Telegram channel
Install / Use
/learn @alcortazzo/VktgbotREADME
About
Python script to automatically repost from VK community pages to Telegram channels or chats. Once the script is set up and running, it will check for new posts in VK every N seconds using VK API and, if there are any, parse and send them to Telegram.
How to use the script
You can manually run the script with Python or Docker and leave it running in the background. Or you can set the script to run automatically on the remote server with tools like crontab, systemd, etc. Or you can configure the script to run at one time if you set VAR_SINGLE_START = True in .env file.
Installation
# clone the repository
$ git clone https://github.com/alcortazzo/vktgbot.git
# if you want to clone specific version (for example v2.6)
$ git clone -b v2.6 https://github.com/alcortazzo/vktgbot.git
# change the working directory to vktgbot
$ cd vktgbot
Note that in version 3.0 the script has been rewritten from the pyTelegramBotAPI library to the aiogram library. So if you want to install an older version of the script working with the pyTelegramBotAPI library, install version 2.6 using the method above. You can find instructions on how to run an older version of the script here.
Configuring
Open .env configuration file with text editor and set the following variables:
VAR_TG_CHANNEL = @aaaa
VAR_TG_BOT_TOKEN = 1234567890:AAA-AaA1aaa1AAaaAa1a1AAAAA-a1aa1-Aa
VAR_VK_TOKEN = 00a0a0ab00f0a0ab00f0a6ab0c00000b0f000f000f0a0ab0a00b000000dd00000000de0
VAR_VK_DOMAIN = bbbb
VAR_TG_CHANNELis link or ID of Telegram channel. You must add bot to this channel as an administrator!VAR_TG_BOT_TOKENis token for your Telegram bot. You can get it here: BotFather.VAR_VK_TOKENis personal token for your VK profile. You can get it here: HowToGet.VAR_VK_DOMAINis part of the link (after vk.com/) to the VK channel. For example, if link isvk.com/durov, you should setVAR_VK_DOMAIN = durov.
Open the file "last_id.txt" and write in it the ID of the last message (not the pinned one!):
- For example, if the link to post is
https://vk.com/wall-22822305_1070803, then the id of that post will be1070803. - Example photo
Running
Using Python
# install requirements
$ python3 -m pip install -r requirements.txt
# run script
$ python3 vktgbot
Using Docker
# change the working directory to docker
$ cd docker
# build and run docker
$ docker-compose up --build
License
GPLv3<br/> Original Creator - alcortazzo
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
109.5kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
349.2kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
