Welcome to the Slack Status Scheduler Template! This template allows you to create an application that enables users to schedule their Slack status updates in advance. Users can send a direct message to the bot with their desired status, an optional emoji, and the start/end times for the status. The app will handle scheduling conflicts, notify the user accordingly, and change the user's Slack status at the scheduled times. This guide will walk you through the steps to set up and use this template on the Lazy platform.
To begin using the Slack Status Scheduler Template, click "Start with this Template" on the Lazy platform. This will pre-populate the code in the Lazy Builder interface, so you won't need to copy, paste, or delete any code.
Before you can test and use the app, you'll need to set up some environment secrets within the Lazy Builder. These secrets include your Slack Bot Token and User Token, which are necessary for the app to interact with the Slack API on behalf of your Slack workspace and users.
users:read
, users.profile:write
, and users.profile:read
.SLACK_BOT_TOKEN
and SLACK_USER_TOKEN
, and paste the respective token values you obtained from Slack.Once you have set up the environment secrets, you can test the app by pressing the "Test" button. This will deploy the app and launch the Lazy CLI. If the app requires any additional user input, you will be prompted to provide it through the CLI.
After testing and deploying the app, users can interact with it by sending direct messages to the bot in Slack. The message should contain the desired status, an optional emoji, and the start/end times in the following format:
:emoji: Status message HH:MM DD-MM-YYYY HH:MM DD-MM-YYYY
For example:
:vacation: On vacation 10:00 01-06-2023 17:00 05-06-2023
The app will parse the message, schedule the status update, and confirm the scheduling with the user. If the format is incorrect, the app will inform the user about the correct format.
After deploying the app on Lazy, you can integrate it with your Slack workspace by inviting the bot to the channels where you want it to listen for status update requests or by sharing it with users who can send direct messages to the bot.
Remember, the app uses the user's timezone from Slack for scheduling, so ensure the system clock is synchronized with the actual time to avoid scheduling issues.
That's it! You've successfully set up the Slack Status Scheduler Template on Lazy. Users in your Slack workspace can now schedule their status updates with ease.