Instagram to Telegram Channel Bot.

InstaTG

Instagram to Telegram Channel Bot. Can access posts from any public Instagram account or an account that you follow.

Features

  • Keeps track of existing sent posts to tg in an embedded db.
  • Fast & Concurrent (at least as much as Telegram's rate limit allows it to be).
  • You can send the latest posts at periodic intervals or send all past Instagram posts.
  • Tested on Linux, but should also work across platforms (Win/Mac/Linux) and architectures (ARM/x86).

Prerequisites

  • Have a spare Instagram account.
  • Create a telegram bot using botfather and obtain its HTTP token.
  • Create a telegram channel.
  • Add your bot to your channel and make it admin.
  • Get your channel chat id using https://api.telegram.org/botXXX:YYYYY/getUpdates (replace the XXX:YYYYY with your BOT HTTP API Token you just got from the Telegram BotFather)

Usage

There are two versions:

  • cmd/app - Fetch the latest posts from an Instagram channel and send them to a Telegram channel.
  • cmd/historical - Fetch all historical/past posts from an Instagram channel and send them to a Telegram channel.

You should probably run cmd/app as a background service while cmd/historical is a one-off.

Note: You need Go to compile it or maybe you can grab pre-compiled builds from somewhere.

Note: The directory where you place the binaries must be user writeable.

Compile using go build -o ./bin/instatg ./cmd/app

From CLI

$ ./instatg \
      -tgtoken "XXXXX:YYYYY" \
      -tgchannel "-123456789" \
      -iguser "yourusername" \
      -igpass "yourpassword" \
      -igchan "exampleaccount"
Usage of instatg:
  -dbpath string
        Database File Path (optional) (default "./store.boltdb")
  -igchan string
        Instagram Channel's Username
  -igpass string
        Your Instagram Password
  -iguser string
        Your Instagram Username
  -rerun int
        Interval (in minutes) after which the bot should check IG for more posts (default 15)
  -tgchannel int
        Telegram Channel ID
  -tgtoken string
        Telegram Bot Token

As SystemD Service

Add service in ~/.config/systemd/user/instatg.service

[Unit]
Description=InstaTg Bot for Channel X

[Service]
Restart=always
WorkingDirectory=/home/icewreck/somefolder
ExecStart=/home/icewreck/somefolder/instatgapp \
                                    -tgtoken "XXXXX:YYYYY" \
                                    -tgchannel "-123456789" \
                                    -iguser "yourusername" \
                                    -igpass "yourpassword" \
                                    -igchan "exampleaccount"

[Install]
WantedBy=default.target


And then enable it.

systemctl --user daemon-reload
systemctl --user start instatg.service
systemctl --user enable instatg.service
# check status
systemctl --user status instatg.service

Thanks To

Owner
Anchit Bajaj
Student. Developer. Tech Enthusiast.
Anchit Bajaj
Similar Resources

discord bot that plays music in a voice channel discord

Music discord bot by serje3 Description A bot written in the Golang language plays music on your server's voice channel on Discord. It can be built an

Nov 17, 2021

A Discord bot for downloading attachments from channel messages.

A Discord bot for downloading attachments from channel messages.

dcdl This is a Discord bot for downloading attachments from channel messages. Setup First, set up a Discord bot application (see here how to do so). N

May 11, 2022

This slack-bot collects all @gophers notifications into one slack channel

slack-bot Slack bot copying reference to a ping to notifications channel The bot is designed to listen on messages containing specific tag, copy refer

Apr 11, 2022

Bot-template - A simple bot template for creating a bot which includes a config, postgresql database

bot-template This is a simple bot template for creating a bot which includes a c

Sep 9, 2022

The serverless OTP telegram service use telegram as OTP service, and send OTP through webhook

Setup OTP First thing, you need prepare API(webhook) with POST method, the payload format as below { "first_name": "Nolan", "last_name": "Nguyen",

Jul 24, 2022

IRC, Slack, Telegram and RocketChat bot written in go

IRC, Slack, Telegram and RocketChat bot written in go

go-bot IRC, Slack & Telegram bot written in Go using go-ircevent for IRC connectivity, nlopes/slack for Slack and Syfaro/telegram-bot-api for Telegram

Dec 20, 2022

Golang telegram bot API wrapper, session-based router and middleware

go-tgbot Pure Golang telegram bot API wrapper generated from swagger definition, session-based routing and middlewares. Usage benefits No need to lear

Nov 16, 2022

Telegram Bot Framework for Go

Margelet Telegram Bot Framework for Go is based on telegram-bot-api It uses Redis to store it's states, configs and so on. Any low-level interactions

Dec 22, 2022

Client lib for Telegram bot api

Micha Client lib for Telegram bot api. Supports Bot API v2.3.1 (of 4th Dec 2016). Simple echo bot example: package main import ( "log" "git

Nov 10, 2022
Dlercloud-telegram-bot - A Telegram bot for managing your Dler Cloud account

Dler Cloud Telegram Bot A Telegram bot for managing your Dler Cloud account. Usa

Dec 30, 2021
Pro-bot - A telegram bot to play around with the community telegram channels

pro-bot ?? Pro Bot A Telegram Bot to Play Around With The Community Telegram Cha

Jan 24, 2022
Simple telegram Bot to ban Anonymous Channel users in a group

Restrict Channel Robot Telegram Bot, written in GoLang to delete messages and ban anonymous users who send as channel in groups. Can be found on teleg

Dec 20, 2022
A telegram bot to ban the chat spammers by channel, made with Golang.

ChannelBot A telegram bot to ban channels spamming chat. Vars TOKEN - Your Telegram Bot Token (@BotFather) More Information With the latest update of

Nov 8, 2022
Slack-emoji-bot - This Slack bot will post the newly created custom Slack emojis to the channel of your choice

Slack Emoji Bot This Slack bot will post the newly created custom Slack emojis t

Oct 21, 2022
"Ukaska" is a MongoDB image with a built-in backup to Telegram channel

Ukaska Ukaska (eng. Pointer) - is docker image with mongodb, that has builtin backup to Telegram Getting Started Build with Docker Mongo DB docker ima

Jun 28, 2022
Tg-channel-api - A JSON API for latest messages of public Telegram channels

Telegram Channel API A JSON API for latest messages of public Telegram channels.

Oct 27, 2022
Bot - Telegram Music Bot in Go

Telegram Music Bot in Go An example bot using gotgcalls. Setup Install the serve

Jun 28, 2022
A Discord bot for managing ephemeral roles based upon voice channel member presence.
A Discord bot for managing ephemeral roles based upon voice channel member presence.

ephemeral-roles A Discord bot for managing ephemeral roles based upon voice channel member presence. Quickstart Click on the Ephemeral Roles logo head

Dec 19, 2022
A discord bot that watches for tiktok URL's and automatically uploads the corresponding video to the channel

TikiTok Bot A Discord bot that watches for TikTok URLs and sends a message to the channel with the corresponding video attached Click to invite the bo

Jul 28, 2022