Skip to content

Instantly share code, notes, and snippets.

Forked from dogeared/00_README
Last active June 12, 2018 06:44
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Extracting / Exporting custom emoji from Slack
This builds off the excellent work of @lmarkus & @dogeared.
The scripts below can be used in conjunction with the Slack Emoji Tools Google Chrome extension to export emojis from
one Slack team and import into another team.
Original work here:
// Login to your team through the browser.
// Go to: https://<team name>
// Run this on the browser's dev tools javascript console
var emojis = $('.emoji_row');
var emojiList = () {
var url = $(this).find('td:nth-child(1) span').attr('data-original');
if (url.length > 512) { // bonkers data-urls
return null
var extension = url.substring(url.lastIndexOf('.'));
var name = $(this).find('td:nth-child(2)').html().replace(/:|\s/g, '');
return {name, extension, url}
function curlEmoji({name, extension, url}) {
return `url "${url}"
output "${name}${extension}"
function curlConfigFilename() {
var slackHost = new URL(boot_data.team_url).hostname.split('.', 1)[0]
return `${slackHost}-emoji.curl.cfg`
var curlOptions =
var output = new Blob(curlOptions, {type: "text/plain"})
var downloadLink = document.createElement("a")
downloadLink.href = URL.createObjectURL(output) = curlConfigFilename()
downloadLink.append(`⬇️ Download: ${curlConfigFilename()}`)
* this will download a curl.cfg file
* use it with curl as
* curl --config ourteam-emoji.curl.cfg
* and files will be downloaded to the current directory.
* You can now drag and drop all the emoji files in the output folder to the Buld Emoji Uploader space that you'll see on
* the https://<team> page if you've installed the chrome extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment