Automatically convert your Slack workspace's user avatars into custom emojis. This tool fetches user profile pictures, removes backgrounds, and creates Slack-compatible emoji formats - perfect for adding a personal touch to your workspace communications. This is all performed locally on your computer using the CPU.
Once you've generated your images, you can use a Chrome Extension (Options, though I can't vouch for these (compute with care!): 1 2) to bulk-add them.
- Automatic user avatar fetching from Slack workspace
- Smart background removal using AI-powered image processing
- Bulk emoji generation in Slack-compatible format
- Intelligent filtering of bot accounts and deleted users
- Preserves image quality while meeting Slack's emoji requirements
- Node.js (specified in
.nvmrc) - Python 3.x
- Slack Workspace Admin access
- Slack API Token with appropriate scopes (
users:read,users.profile:read)
-
Clone the repository:
git clone https://github.com/your-username/company-slackmoji.git cd company-slackmoji -
Install Node.js dependencies:
npm install
-
Set up Python environment:
python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r requirements.txt
-
Configure environment:
cp .env.example .env # Edit .env and add your SLACK_TOKEN
Run the following commands in sequence:
-
Fetch user data from Slack:
npm run fetch
-
Process the user data:
npm run process
-
Generate the emojis:
npm run generate
The processed emojis will be available in the data/output directory.
company-slackmoji/
├── src/
│ ├── fetch.js # Slack API integration
│ ├── process.js # Data processing logic
│ ├── processAvatars.js # Image processing
│ └── remove_bg.py # Background removal
├── data/
│ ├── json/ # User data storage
│ ├── avatars/ # Downloaded avatars
│ └── output/ # Processed emojis
└── config/ # Configuration files
| Variable | Description | Required |
|---|---|---|
SLACK_TOKEN |
Slack Bot User OAuth Token | Yes |
OUTPUT_DIR |
Custom output directory | No |
You can adjust image processing parameters in config/processing.json:
- Maximum emoji size
- Background removal sensitivity
- Output format preferences
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- rembg for background removal
- sharp for image processing
- The Slack API team for their excellent documentation
Common issues and solutions:
- Permission Errors: Ensure your Slack token has the required scopes
- Image Processing Fails: Check Python dependencies are correctly installed
- Rate Limiting: The tool includes automatic rate limiting, but you may need to adjust delays for large workspaces
For more help, please open an issue.