Automate your Slack status updates based on your daily schedule. This tool helps manage your availability, focus time, and communication with your team through automated status updates and Do Not Disturb (DND) settings.
- π Automated daily schedule for status updates
- π― Quick toggles for focus mode
- β Preset coffee breaks
- π€ Meeting status updates
- π Automatic DND management
- π Status preservation and restoration
- π Configurable work hours
- Node.js (v14 or higher)
- npm
- A Slack workspace where you have permissions to create apps
-
Create a new Slack App:
- Go to api.slack.com/apps
- Click "Create New App"
- Choose "From scratch"
- Name your app (e.g., "Status Automation")
- Select your workspace
-
Add Required Scopes:
- Navigate to "OAuth & Permissions"
- Under "Scopes", add these Bot Token Scopes:
dnd:write
- Edit Do Not Disturb settingsusers.profile:read
- View profile details in workspaceusers.profile:write
- Edit profile information and statususers:write
- Set user presence (away/active)
These permissions are required because the app needs to:
- Toggle Do Not Disturb mode during focus time and meetings
- Read current status before making changes
- Update your status message and emoji
- Change your presence between active and away states
- Install App to Workspace:
- Click "Install to Workspace"
- Authorize the app
- Copy the "Bot User OAuth Token" (starts with
xoxb-
)
- Clone the repository:
git clone [email protected]:iamgraeme/graeme-slack-automation.git
cd graeme-slack-automation
- Install dependencies:
npm install
- Create environment file:
cp .env.example .env
- Add your Slack token to
.env
:
SLACK_TOKEN=xoxb-your-token-here
PORT=3000
The default schedule is:
09:00 - Standup Prep
09:15 - Engineering Standup
09:30 - Stakeholder Communications
10:30 - Deep Focus Time
12:30 - Lunch Break
13:30 - Code Reviews & Team Support
15:30 - Admin Time
17:00 - End of Day
Modify the SCHEDULE
array in status.js
to adjust times and durations.
- Running the Server
# Run with hot-reload (recommended for development)
npm run dev
# First build the TypeScript files
npm run build
# Then start the server
npm start
npm run dev
- Starts server in development mode with auto-reloadnpm run build
- Compiles TypeScript to JavaScriptnpm start
- Runs the compiled JavaScript (for production)npm run lint
- Checks for code style issuesnpm run lint:fix
- Automatically fixes code style issues
When running, you should see:
Server running on port 3000
Status automation running...
Daily schedule configured
If you encounter any issues:
-
Make sure your
.env
file is properly configured -
Verify your Slack token has the required permissions
-
Check the console for any TypeScript compilation errors
-
Ensure all dependencies are installed (
npm install
) -
Available endpoints:
# Quick 5-minute break
curl -X POST http://localhost:3000/coffee/quick
# Regular 15-minute break
curl -X POST http://localhost:3000/coffee/regular
# Coffee chat 30-minute break
curl -X POST http://localhost:3000/coffee/chat
# Toggle focus mode
curl -X POST http://localhost:3000/toggle-focus
# Start a meeting (default 30 mins)
curl -X POST http://localhost:3000/meeting
# Custom duration meeting
curl -X POST -H "Content-Type: application/json" -d '{"duration":45}' http://localhost:3000/meeting
# Clear status
curl -X POST http://localhost:3000/clear-status
# Check current status
curl http://localhost:3000/current-status
Import the provided Slack_Status_Automation.postman_collection.json
for easy testing of all endpoints.
const STATUSES = {
STANDUP_PREP: {
status_text: "Standup Prep",
status_emoji: ":clipboard:",
dnd: false,
presence: 'auto'
},
DEEP_FOCUS: {
status_text: "Deep Focus Time - Available after 12:30",
status_emoji: ":dart:",
dnd: true,
presence: 'away'
},
// ... other statuses
}
- If emoji errors occur, verify the emoji exists in your Slack workspace
- Check console logs for detailed error messages
- Server errors return 500 status with error details
- Invalid requests return 400 status with error message
- Fork the repository
- Create a feature branch
- Commit changes
- Push to the branch
- Create a Pull Request
- Invalid Emoji: Ensure emojis exist in your Slack workspace
- Token Issues: Verify token has correct scopes
- Schedule Conflicts: Later status updates override earlier ones
To add new status types:
- Add to
STATUSES
object - Create corresponding endpoint if needed
- Add to schedule if required
Example new status:
CUSTOM_STATUS: {
status_text: "Your Status",
status_emoji: ":emoji:",
dnd: boolean,
presence: 'auto'|'away'
}
- Keep your Slack token secure
- Add
.env
to.gitignore
- Don't expose the server to public internet
- Use environment variables for configuration
MIT
- Inspired by the need for better focus time management
- Built for developers by developers
This project was inspired by James Clear's "Atomic Habits" and applies several of its core principles to managing your work day:
- Clear status indicators for different work modes
- Automated schedule removes decision fatigue
- Visual cues to team members about your availability
- Easy-to-use endpoints for quick status changes
- Seamless transitions between work modes
- Professional status messages that improve team communication
- Automated status changes require zero effort
- Quick toggles for common situations (coffee, focus time)
- Preserve previous status to reduce friction
- Simple REST endpoints for custom integrations
- Consistent daily routine
- Protected focus time
- Improved team awareness
- Better work-life boundaries
The goal is to create "small wins" throughout your day by:
- Protecting your focus time
- Communicating clearly with your team
- Managing interruptions effectively
- Creating predictable work patterns
Just as Atomic Habits suggests stacking small improvements, this tool helps you build better work habits through automated micro-behaviors that compound over time.