Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 2.29 KB

README.md

File metadata and controls

43 lines (33 loc) · 2.29 KB

tg-slack-channel-manager

This repository consists of a Slackbot that forward all message from the Slacks channels (with prefixes ext- and ext-partner) to centralised Slack channels.

Our example consist of:

  • Forward all external user messages from channels starts with ext-partner-* to ext-partner-all
  • Forward all external user messages from channels starts with ext-* (but not ext-partner-*) to ext-all
  • Automatically detect/create ext-all and ext-partner-all channels on bot start up
  • Automatically monitoring any newly created ext-* and ext-partner-* channels

Prerequisites

  1. Slack Workspace (with admin access to deploy)
  2. Ability to deploy a Slackbot (instructions below)

Install Steps

Create and setup Slack App

  1. Create New Slack app from a manifest here
  2. Paste the content from manifest.yaml
  3. Install the Slack app to your Workspace
  4. Retrieve the signing secret from the Basic Information page and bot token from OAuth & Permissions page

Configuration

Please prepare the following configuration parameters (refer to the example file):

  • SLACK_SECRET Slack signing secret
  • SLACK_BOT_TOKEN Slack bot token (begins with xoxb-)

Deploy on Google CloudRun (CloudRun Button)

  1. Ensure you have the following pre-requisites:
    • All configuration parameters from the Configuration section above
    • PROJECT_ID GCP Project (will be passed to container for it to access secrets)
    • Google Cloud project owner
  2. Click and follow the steps in GCP CloudShell, entering the configuration parameters when prompted:

Run on Google Cloud

The Run on Google Cloud option will prompt for all pre-requisite parameters during setup and store them as secrets. For a full description of the executed steps please see app.json.

For a manual deployment you may instead follow the manual instructions

Complete setup in Slack App UI

  1. Go to your app at Slack App UI
  2. Event Subscription
    • Replace the Request URL to https://{Your tg-slack-channel-manager URL}/slack/events