{"id":18552867,"url":"https://github.com/oderwat/slacktogo","last_synced_at":"2025-04-09T22:32:04.831Z","repository":{"id":15038216,"uuid":"17764120","full_name":"oderwat/slacktogo","owner":"oderwat","description":"Slack Integration Server for distributing channels between different slack teams. Written in GoLang featuring stand-alone + multi-plattform usage!","archived":false,"fork":false,"pushed_at":"2014-04-24T14:12:22.000Z","size":200,"stargazers_count":27,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T15:18:37.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oderwat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-14T23:48:43.000Z","updated_at":"2025-03-15T23:20:08.000Z","dependencies_parsed_at":"2022-09-07T13:42:03.220Z","dependency_job_id":null,"html_url":"https://github.com/oderwat/slacktogo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fslacktogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fslacktogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fslacktogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oderwat%2Fslacktogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oderwat","download_url":"https://codeload.github.com/oderwat/slacktogo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123799,"owners_count":21051535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T21:15:24.313Z","updated_at":"2025-04-09T22:32:04.553Z","avatar_url":"https://github.com/oderwat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"SlackToGo\n=========\n\n## What does this application?\n\n**SlackToGo** is a stand alone **Slack** integration server for distributing channels between different Slack teams in realtime.\n\n([Stop talking... tell me how to use it!](#usage))\n\n## What is \"Slack\"?\n\n[Slack.com](https://slack.com/r/02560adf-0256965h) is a team oriented chat + fileserver.\n\nIt offers:\n\n* Custom channels (subscription based)\n* Private groups (invitation based)\n* Personal messaging\n* File storage for the team to share data\n* Powerful search in messages and file storage\n* Historical views of conversations\n* Useful team statistics\n* A lot of useful integrations (including GitHub!)\n* Smartphone Clients\n* Desktop Applications\n\n## Why did you create SlackToGo?\n\nI use slack primarily in two different teams. You can be member of any number of teams but Slack currently lack a feature to share one or more channels between two teams.\n\nBecause Slack offers a broad selection of API and integration functions I decided to write a \"channel connector\" for connect a \"#friends\" channel between my primary two teams which can be used to talk with the respective other team members.\n\n## Why GoLang?\n\nAfter prototyping this as PHP / Apache code I decided to switch to GoLang.\n\nI choose Go because I could learn how to create a stand alone server executable people can use without being able to run Apache/PHP on their systems. In addition to that it is (should) be useable cross platform.\n\nThis was also done in preparation to rewrite [Hubic2SwiftGate](https://github.com/oderwat/hubic2swiftgate) in GoLang because I want to have a version for less \"geeky\" people to use.\n\nWith a little help of other peoples libraries I also managed to make the server easily install as a system service on Apple, Windows and Linux Systems!\n\nBecause we deal with kind of private information the gateway server also supports SSL (https).\n\n## \u003ca name=\"usage\"\u003e\u003c/a\u003eHow to use it?\n\n***I will offer binary downloads for Mac / Win / Linux at a later time!***\n\n### Installing from source (only tested on OS X so far):\n\nYou need to have a GoLang installation!\n\nI use [GoLang](http://golang.org/) on my mac with the help of **homebrew** but you can install go on any supported system from [here...](http://golang.org/doc/install).\n\nWith a valid go installation you can install SlackToGo with go get:\n\n    go get github.com/oderwat/slacktogo\n   \nNext is changing to the source location and build it local in that directory:\n\n    cd `go env GOPATH`/src/github.com/oderwat/slacktogo\n    go build\n    \nAfter this there should be an executable named \"slacktogo\" in the folder. You can run it and it should complain about a missing configuration file. This will be created next!\n\n### Modifying the config file:\n\nIn preparation to use the gateway you need to create a config file. A sample is located in the folder named `config_sample.toml`. It looks like this:\n\n    #\n    # Sample configuration for slacktogo\n    #\n    \n    #BindAddr= # Default is to bind to all interfaces\n    Port=8080\n    #SSLCrt=\"domain_tld.crt\" # I highly recommmend using SSL!\n    #SSLKey=\"domain_tld.key\"\n    \n    [Team.foo] # First Team\n    ID=\"T01234FOO\"\n    URL=\"https://foo.slack.com/services/hooks/incoming-webhook?token=12345abcdeABCDE12345foo\"\n\n    [Team.bar] # Second Team\n    ID=\"T01234BAR\"\n    URL=\"https://bar.slack.com/services/hooks/incoming-webhook?token=12345abcdeABCDE12345bar\"\n\n    [[Mapping]]\n    FromTeam=\"foo\"\n    FromChannel=\"#friends\"\n    ToTeam=\"bar\"\n    ToChannel=\"#friends\"\n\n    [[Mapping]]\n    FromTeam=\"bar\"\n    FromChannel=\"#friends\"\n    ToTeam=\"foo\"\n    ToChannel=\"#friends\"\n\nCreate a copy of this named: `config.toml`\n\nThis sample connects two teams with the names \"foo\" and \"bar\" to share a channel named \"#friends\".\n\nIn the beginning you can setup the IP the server listens too (default is to listen on all interfaces. You may probably just keep it like that).\n\nNext is the \"Port\" on wich the server will listen to incoming connections. It is important that this port is reachable from the slack servers so you may need to configure a port mapping at your nat-router and/or open your firewall for this port.\n\n*I highly recommend, that you use SSL for the gateway server! I never tried without myself.*\n\nIf you don't the Outgoing WebHook will transmit unencrypted data of all conversions in the connected channels.\n\nYou need the same certificates as for any OpenSSH compatible web server (like Apache2). There can be \"real\" certificates or self-signed ones. There is plenty documentation how to get them.\n\nFinally there is the part which defines your Slack teams and where you need to setup some integrations in Slack:\n\n* Outgoing Webhooks for each Team pointing to the URL of the computer running the SlackToGo Server.\n* Incoming Webhooks for each Team to be able to receive the messages from the other team(s).\n* (optional) an OpenSSH compatible SSL Certficate + Key\n\nLets assume that you run slacktogo on a system which is reachable from the internet (by port forwarding or direct) under the subdomain `slackgate.yourdomain.tld` on port 8080.\n\nRun the SlackToGo Server manually:\n\n    ./slacktogo\n    \nor from source:\n\n    go run slacktogo.go\n\nYou should verify that the server is reachable by opening its address in a web browser. This URL would be in this example: `http://slackgate.yourdomain.tld:8080/`. If you have a SSL Certificate (and I strongly recommend this!) you use `https://slackgate.yourdomain.tld:8080/`.\n\nIf every thing work fine you will a webpage with:\n\n    Illegal access to Slackgate... (c) METATEXX GmbH 2014\n\nYou then need to setup an **Outgoing WebHook** in the Slack integrations panel of each team. You select the **channel** which you want to \"broadcast\" and leave **trigger words** empty! You may want to create a new channel for this first (e.g. #friends)!\nThe target URL for this WebHook is the aforementioned URL.\n\nThis hast to be done with every team and channel which gets broadcast!\n\nAfter this you go to this channel in slack and write \"+info\" or anything. The SlackToGo Server will reply with `Unknown Team: {\"T#########\" \"#friends\"}`. Instead of `T#########` you will get the real TeamID for this team. Enter this as the ID in the config file for this team.\n\nDo this for all the teams you want to connect!\n\nNext you setup the **Incoming WebHooks** in the Slack integrations control panel.\n\nClick on \"EXPAND\" at \"Instructions for creating Incoming WebHooks\" and copy the URL which is shown there. It looks similar to the URL entries in the config file. Just with your teams name and token.\n\nPut those URLs an your real team names in the config file instead of \"foo\" and \"bar\".\n\nStop the SlackToGo Server (CTRL+C) and start it again.\n\nFrom there on you should be able to chat with the members of the other team in the connected channel(s).\n\nIt is possible to connect \"bidirectional\" or to broadcast one channel to multiple different teams. This is controlled by the \"Mapping\" section of the config file. The syntax for this should be self explaining.\n\n### Installing as Service\n\nAfter you have the gateway working with the setup you need you can install the software as a service which auto-starts with your system:\n\n     sudo ./slacktogo install\n     sudo ./slacktogo start\n     \nTo stop the service:\n\n    sudo ./slacktogo stop\n    \nTo uninstall the service:\n\n    sudo ./slacktogo remove\n    \nYou also can dump the configuration:\n\n    slacktogo check\n    \n### SlackToGo Commands\n\nYou can check the loaded routing in the slack chat by typing:\n\n    +routing\n  \nYou can check the running version with\n\n    +info\n\nNotice: This is the first \"quick\" documentation for this rather complicated topic. I would love to hear about your experiences in getting this running! Feel free to write your comments into the issues section of this repository!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foderwat%2Fslacktogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foderwat%2Fslacktogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foderwat%2Fslacktogo/lists"}