Skip to main content

Slack

With Slack connected, Delegaris messages people directly: a reminder before their machine is stopped, with buttons to add an hour or two, and requests for approval with Approve and Decline buttons. It also posts to channels: approval requests, alerts and a weekly summary.

Keeping machines on, approvals and everything else work the same without Slack. Nobody is reminded, that is all.

1. Create the Slack app​

  1. Go to api.slack.com/apps and create an app in your workspace.
  2. Under OAuth & Permissions, add these bot token scopes:
    • chat:write, to send messages
    • users:read.email, to find people by email address
  3. Install the app to your workspace and copy the Bot User OAuth Token (xoxb-…).

2. Turn on the buttons (optional)​

For the +1 hour and +2 hours buttons on reminders, and Approve and Decline on approval requests:

  1. In the app's settings, turn on Socket Mode.
  2. Create an app-level token with the connections:write scope and copy it (xapp-…).
  3. Turn on Interactivity.

Socket Mode means Delegaris connects out to Slack, so it does not need to be reachable from the internet. Without the app-level token, messages arrive as plain text with a link instead of buttons.

3. Give Delegaris the tokens​

The tokens are set in the settings file only (.env with Docker, /etc/delegaris/delegaris.env with the Linux package), never in the web UI:

SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_APP_TOKEN=xapp-your-app-token
SLACK_FALLBACK_CHANNEL=#delegaris
SettingPurpose
SLACK_BOT_TOKENThe bot token. Required for anything to be sent
SLACK_APP_TOKENThe app-level token, for buttons. Optional
SLACK_FALLBACK_CHANNELA channel (name or ID) for messages that cannot reach their person. The app must be invited to it. Optional

Restart Delegaris after changing them: docker compose up -d with Docker, or sudo systemctl restart delegaris with the Linux package.

4. Test it​

Open Settings > Notifications. The Slack reminders section says Connected, and where messages for people Slack cannot find will go.

Press Send me a test message. It sends a message to you, found by the email address you signed in with, and says where it went:

  • "Sent to you in Slack (your address)."
  • "Sent to #channel, because …", if you could not be found and a fallback channel is set.
  • "Not sent: …", with the reason.

If you signed in as the local administrator, set LOCAL_ADMIN_EMAIL to the address Slack knows you by, or the test has nobody to send to.

Settings > Health and backups shows whether the buttons are connected to Slack.

How people are found​

Delegaris finds each person in Slack by the email address their sign-in provided:

  • Active Directory: the mail attribute, or failing that the user principal name.
  • Entra ID: the token's email claim, or failing that the sign-in name when it is an email address.

Someone who cannot be found (no email address, or no Slack member with that address) gets nothing directly. Their message goes to the fallback channel instead, starting "For name:", if one is set. Messages with buttons go only to the person directly, never to a channel, because in a shared channel anyone could press them.

People are only known to Delegaris once they have signed in at least once. Approvers who have never signed in cannot be messaged.

What is sent to people​

MessageToButtons
A keep-on is about to end: what will be stopped (or put back on its schedule) and when, with a link to change the timeThe person who last set the time, 15 minutes before by default+1 hour, +2 hours
The keep-on has ended: the resource has been stopped and is back on its normal schedule, or just back on its scheduleThe same person
Someone else moved the time, or ended the keep-on earlyThe others who had set a time on it
Delegaris could not stop the resource at the end, and gave up retryingThe person who set it
A request for approval is waitingEach approverApprove, Decline
Your request for approval was approved (with how it went), declined (with the note) or expiredThe person who asked
Someone has asked for accessEach administrator
Your request for access was granted or declinedThe person who asked
A booked window could not start, and whyThe person who booked it

Times in messages are shown in each reader's own time zone, as Slack does.

The reminder buttons​

+1 hour and +2 hours move the keep-on's time on, exactly as Change time would:

  • Only the person the reminder was sent to can press them.
  • The usual limit on how long something can stay on applies. At the limit, the reply says so.
  • Each press is recorded in the activity log as theirs, "from Slack".
  • The message is replaced with the new time, and a fresh reminder comes before the new end.

The reminder lead time is Reminder, in minutes before under Settings > Schedules (default 15). The same warning shows at the top of the Resources page.

The approval buttons​

Approve and Decline decide a request exactly as the Approvals page would, as the approver who pressed:

  • Delegaris finds who pressed it by their Slack account's email, and checks they may decide this request.
  • Approved, the action runs at once and the message is replaced with how it went.
  • A request already decided says so, and by whom.

Requests for access still need the web page, because granting one means choosing the rule. See Approvals.

What is posted to channels​

Channels are set under Settings. The app must be invited to each one.

ChannelSettingWhat goes there
Approvals channelSettings > ApprovalsEvery request for approval, as well as to the approvers directly. No buttons
Weekly summary channelSettings > Notifications > Slack channelsA summary of the previous week, every Monday at 09:00. See Reports
Alerts channelSettings > Notifications > Slack channelsWhen AWS credentials stop working, a keep-on is past its time and still not finished, or a backup fails. Repeated every six hours while it lasts, and once when it clears. Empty uses the fallback channel. See Backups and health

Write channels like #delegaris or as a channel ID. Starting values can be given in .env as SLACK_APPROVALS_CHANNEL, SLACK_SUMMARY_CHANNEL and SLACK_ALERT_CHANNEL; once saved in the web UI, the saved values apply.

Microsoft Teams​

Teams cannot reach people one by one the way Slack can. Instead, a Teams channel can receive everything as a stream of posts. See Teams and webhooks.

Next steps​