Stop interrupting your deep work to update your status.
This tool automatically syncs your Google Calendar to your Slack status in real-time. It acts as your silent digital assistant, letting your colleagues know exactly when you are busy, in a meeting, or out for lunch—without you ever touching Slack.
- Focus Protection: Automatically shows "In a Meeting" or "Coding" so colleagues know not to disturb you.
- Context Aware: Uses smart keywords to pick the right icon (e.g., "Lunch" → 🍱, "Deep Work" → 🧠, "Commuting" → 🚋).
- Privacy First: If you mark a calendar event as "Private", this bot simply shows "Busy" 🔒 without revealing the details.
- Set & Forget: Runs on your office server or PC (Docker) and restarts automatically if the system reboots.
To make this work, you need two keys:
- Google Calendar Authorization: To let the bot read your schedule.
- A Simple Slack App: To let the bot write your status.
Don't worry—you don't need to be a developer to set this up. Follow the guide below.
Goal: Get the credentials.json file.
- Go to the Google Cloud Console.
- Create a new project (e.g.,
Slack-Status-Sync). - Enable API: Search for "Google Calendar API" and enable it.
- OAuth Consent Screen (Important):
- Select External.
- Add Test User: You must add your own email address to the "Test Users" list. (If you skip this, the login will fail later).
- Create Credentials:
- Go to Credentials → Create Credentials → OAuth Client ID.
- Select Desktop App.
- Download the JSON file and rename it to
credentials.json.
Goal: Get the User Token (xoxp-...).
- Go to Slack API Apps and click Create New App -> From Scratch.
- Name it (e.g., "Status Bot") and pick your workspace.
- Add Permissions:
- In the sidebar, click OAuth & Permissions.
- Scroll down to User Token Scopes (NOT Bot Token Scopes).
- Add these two permissions:
users.profile:write(To change your status)users.profile:read(To check your current status)
- Install: Scroll up and click Install to Workspace.
- Copy Token: Copy the User OAuth Token that starts with
xoxp-....
If your server has no screen (headless), run this step on your local PC/Mac first.
- Install dependencies:
pip install google-auth-oauthlib google-api-python-client
- Run the helper script included in this repo:
python generate_token.py
- Login via the browser popup. This generates a
token.jsonfile. - Move
credentials.jsonandtoken.jsonto your server'sconfig/folder.
- Open
docker-compose.ymland paste your Slack Token:services: slack-bot: environment: - SLACK_TOKEN=xoxp-your-token-here...
- Start the bot:
docker compose up -d --build
- Check logs:
docker logs -f slack_calendar_bot
The bot is smart. It looks for keywords in your event title. You can customize this in sync_bot.py.
| Keyword in Calendar | Slack Icon |
|---|---|
meeting, mtg, 会議 |
👥 (:busts_in_silhouette:) |
lunch, break |
🍱 (:bento:) |
lecture, class |
🎓 (:mortar_board:) |
experiment, lab, 実験 |
⚗️ (:alembic:) |
| No match | 📅 (:calendar:) |
Open source. Feel free to use and modify for your personal workflow.