/ExportImportSlackEmoji

A python script to export emoji from one slack org and import them into another

Primary LanguagePython

This is python script that exports emoji from one slack organization and imports then into another via the Slack API. Because the Slack API does not allow you to use a non bot/app user token, you have to get some information from your broswer so the script can emulate broswer Slack API calls.

NOTE: This script will only work if you have access to see the emoji page for your source slack org and access to add custom emoji in your destination slack org

Running Instructions

  1. Open a broswer window and open your dev tools network tab
  2. Set a filter of /api/emoji.list
  3. Go to https://YOUR-EMOJI-SOURCE-ORG.slack.com/customize/emoji
  4. You should see one request in your network tab, click it
  5. Copy the Cookie request header value into the sourceSlackOrgCookie variable value in the script
  6. Copy the Token form data value into the sourceSlackOrgToken variable value in the script
  7. Go to https://YOUR-EMOJI-DESTINATION-ORG.slack.com/customize/emoji
  8. You should see one request in your network tab, click it
  9. Copy the Cookie request header value into the destinationSlackOrgCookie variable value in the script
  10. Copy the Token form data value into the destinationSlackOrgToken variable value in the script
  11. Run the script :)

The script will not download emoji you have already downloaded and will not try upload emoji you have already uploaded so if you run into an error that causes the script to fail you can restart it and it will pick up where it left off.