Git Product home page Git Product logo

slack-to-telegram's Introduction

This repository is no longer maintained.

slack-to-telegram is a simple way to forward notifications from Slack to Telegram when you are not logged into Slack. It uses Slack's Real Time Messaging API to connect to specified accounts and will forward messages through Telegram's Bot API to you.

Why

I currently run an Android OS on my phone without Google services. Slack for Android requires Google Cloud Messaging (GCM) in order to receive notifications. Since Telegram has its own mechanism for notifications on Android that does not rely on GCM, I decided to use this as a workaround to receive timely Slack notifications.

Features

  • Support for multiple Slack workspaces
  • Get notifications for direct messages and @username callouts in channels

One Time Initial Setup

  • From the Telegram account you want to receive messages on, get your user ID by sending a message to @get_id_bot
  • Create a telegram bot (https://core.telegram.org/bots#3-how-do-i-create-a-bot) and get the token
  • Send a test message from your Telegram account to your bots username
  • For each Slack account you want to forward messages, you'll need access to the RTM API which previously was possible with legacy tokens but this has been disabled now. Instead you can use this approach which doesn't require installing an app in your organization. Or if you can't get that to work, you can use slack-rtm-token to get an OAuth token with appropriate access, but this will require installing an app in each organization.

Config File

Create a file named config.toml and fill in the details from initial setup above.

[telegram]
user = 123456789 
token = "323456789:ABCDE_fB19OHQZUF3FPPPF43PTEEB"

[[slack]]
name = "workspace #1"
token = "xoxp-xxxxxxx-xxxxxxxx-xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

[[slack]]
name = "workspace #2"
token = "xoxp-xxxxxxx-xxxxxxxx-xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Installation

Binaries

The easiest way is to download a pre-built binary from the GitHub Releases page.

Docker

You can also just run it as a docker container.

docker run --restart=always -d -v $(pwd)/config.toml:/config.toml vdan/slack-to-telegram:latest

Usage

./slack-to-telegram --config config.toml

FAQ

  1. Should I use slack-to-telegram? That's up to you. Use at your own risk.

Powered by

Build From Source

make tools && make

slack-to-telegram's People

Contributors

dan-v avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.