A Chrome/Chromium extension that lets you share URLs and screenshots to Slack with one click. Perfect for teams who need to quickly share interesting finds, report issues, or collaborate on web content.
- 📸 One-click sharing - Share the current page URL with a screenshot to Slack
- 📢 Dynamic channels - Fetches available channels from your Slack workspace
- 💬 Optional notes - Add a personal note to your shares
- 🌙 Dark mode - Light and dark themes
- ⌨️ Keyboard shortcut - Quick share with
Ctrl+Shift+S(configurable) - 🖱️ Context menu - Right-click to share (optional)
- 🔒 Secure - Bot token stored server-side in Cloudflare Worker
- 🌐 Cross-browser - Works on Chrome, Vivaldi, Edge, Brave, and other Chromium browsers
┌──────────────────┐ ┌─────────────────────┐ ┌─────────────┐
│ Browser │ │ Cloudflare Worker │ │ Slack API │
│ Extension │ ───► │ (your deployment) │ ───► │ │
│ │ │ │ │ │
│ • Captures URL │ │ • Holds Bot Token │ │ • Receives │
│ • Takes screenshot│ │ • Validates request │ │ message │
│ • Sends to worker│ │ • Uploads to Slack │ │ • Stores │
└──────────────────┘ └─────────────────────┘ │ file │
└─────────────┘
The Cloudflare Worker acts as a secure proxy, keeping your Slack Bot Token safe on the server side rather than exposing it in the browser extension.
- Slack App with a Bot Token and required scopes
- Cloudflare Account (free tier works)
- Node.js (v18+)
- Go to api.slack.com/apps and click Create New App
- Choose From scratch, give it a name, and select your workspace
- Go to OAuth & Permissions and add these Bot Token Scopes:
chat:write- Post messagesfiles:write- Upload screenshotschannels:read- List public channelsgroups:read- List private channels (optional)
- Click Install to Workspace and authorize
- Copy the Bot User OAuth Token (starts with
xoxb-)
# Clone this repository
git clone https://github.com/AudienseCo/slack-share-extension.git
cd slack-share-extension/worker
# Install dependencies
npm install
# Login to Cloudflare
npx wrangler login
# Set your secrets
npx wrangler secret put SLACK_BOT_TOKEN # Paste your xoxb-... token
npx wrangler secret put API_KEY # Generate one: openssl rand -hex 32
# Deploy
npm run deployNote the worker URL (e.g., https://slack-share-proxy.your-subdomain.workers.dev)
Open extension/icons/generate-icons.html in a browser and download the icons, OR:
cd extension/icons
npm install canvas
node create-icons.js- Open
chrome://extensions/(orvivaldi://extensions/,edge://extensions/) - Enable Developer mode
- Click Load unpacked
- Select the
extensionfolder
- Click the extension icon
- Go to Settings
- Enter your Worker URL and API Key
- Test the connection
- Select your default channel
Edit worker/wrangler.toml to customize:
[vars]
DEFAULT_CHANNEL = "general" # Your default channel nameAvailable in the Options page:
| Setting | Description |
|---|---|
| Worker URL | Your deployed Cloudflare Worker URL |
| API Key | The API key you set when deploying |
| Default Channel | Pre-selected channel when sharing |
| Context Menu | Enable/disable right-click "Share to Slack" |
| Theme | Light or Dark mode |
Click the extension icon → Select channel → Add optional note → Share
Press Ctrl+Shift+S (or Cmd+Shift+S on Mac) for instant share to default channel
Right-click → "Share to Slack" for instant share to default channel
- Customize defaults in the code if desired (worker URL, default channel)
- Generate icons
- Zip the
extensionfolder - Share with your team along with the
INSTALL.mdguide
Edit the DEFAULT_SETTINGS in extension/background.js, popup.js, and options.js:
const DEFAULT_SETTINGS = {
workerUrl: 'https://your-worker.your-subdomain.workers.dev',
apiKey: '', // Leave empty for users to enter, or pre-fill
defaultChannel: 'your-channel',
// ...
};cd worker
npm run devStarts a local worker at http://localhost:8787
After making changes:
- Go to
chrome://extensions/ - Click the refresh icon on the extension
- Bot Token: Stored securely in Cloudflare Worker secrets, never exposed to browsers
- API Key: Provides basic authentication between extension and worker
- Permissions: Extension only requests minimal permissions needed
For additional security:
- Use a strong, randomly generated API key
- Consider adding IP allowlisting to your Cloudflare Worker
- Regularly rotate your API key and Slack token
Some pages don't allow screenshots (chrome:// pages, some secure sites). Try a regular webpage.
Ensure your Slack bot is invited to the channels and has channels:read scope.
Check that the API key in extension settings matches what you set in the worker.
Verify the Worker URL is correct and the worker is deployed.
slack-share-extension/
├── extension/
│ ├── manifest.json # Chrome Extension Manifest V3
│ ├── background.js # Service worker
│ ├── popup.* # Share popup UI
│ ├── options.* # Settings page
│ └── icons/ # Extension icons
├── worker/
│ ├── wrangler.toml # Cloudflare config
│ ├── package.json # Dependencies
│ └── src/index.js # Worker code
├── INSTALL.md # User installation guide
├── LICENSE # MIT License
└── README.md # This file
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Tasteray