Slack Emoji Migrate
About
This Docker app automates the process of migrating custom emoji from Slack to Mattermost.
Setup & Configuration
1. Get a Slack API Token
- From your Workspace, go to Settings & Administration > Manage Apps
- Click
Build
in the top right - Click
Create New App
> From Scratch - Name the app and grant it access to a workspace
- Click "Permissions" and it takes you to "Scopes"
- Under Bot Token Scopes, click
Add an OAuth Scope
- Select the
emoji:read
scope - Scroll to the top and click "Install into Workspace"
- Click "Allow"
- Copy the
Bot User OAuth Token
2. Generate a Mattermost Auth Token
Either create a bot account with admin permissions, or create a personal access token. Make sure that Custom Emoji are enabled in the System Console and that the account has permission to create custom emoji
3. Set Environment Variables
.env
File
Method 1: A Create a file in this directory with these contents:
SLACK_API_TOKEN=<Slack API token>
MATTERMOST_URL=<Your Mattermost URL>
MATTERMOST_TOKEN=<Your Mattermost Authentication Token>
SLACK_TIMEOUT=360
Replace the values
docker-compose
file
Method 2: Modify the Edit the docker-compose.yml
file replace the environment variables with your settings, e.g.
version: "3.7"
services:
slack-emoji-migrate:
build: .
volumes:
- ./output:/usr/src/app/output
environment:
- SLACK_API_TOKEN=xoxb-abc1234.....
- MATTERMOST_URL=https://mattermost.example.com/
- MATTERMOST_TOKEN=ncdfitoh9inixpbycp81f1zkia
- SLACK_TIMEOUT=360
4. Run the script
docker-compose up
4. Clean Up
Once the script has been run successfully, delete the image with this command:
docker image rm slack-emoji-migrate_slack-emoji-migrate