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-*
toext-partner-all
- Forward all external user messages from channels starts with
ext-*
(but notext-partner-*
) toext-all
- Automatically detect/create
ext-all
andext-partner-all
channels on bot start up - Automatically monitoring any newly created
ext-*
andext-partner-*
channels
- Slack Workspace (with admin access to deploy)
- Ability to deploy a Slackbot (instructions below)
- Create New Slack app from a manifest here
- Paste the content from manifest.yaml
- Install the Slack app to your Workspace
- Retrieve the signing secret from the
Basic Information
page and bot token fromOAuth & Permissions
page
Please prepare the following configuration parameters (refer to the example file):
SLACK_SECRET
Slack signing secretSLACK_BOT_TOKEN
Slack bot token (begins withxoxb-
)
- 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
- All configuration parameters from the
- Click and follow the steps in GCP CloudShell, entering the configuration parameters when prompted:
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
- Go to your app at Slack App UI
- Event Subscription
- Replace the Request URL to
https://{Your tg-slack-channel-manager URL}/slack/events
- Replace the Request URL to