Automate your Slack status for fixed days off

Automate your Slack status for fixed days off

Unfortunately, Slack doesn't have a built-in option to automatically set a recurring out-of-office status for a fixed day each week. But no worries: with a free Google account and a little help from Claude, you can set it up yourself in about 15 minutes. Once done, your status will turn on and off automatically every week without any further effort.

What this does

Once set up, your Slack status will:
  • Turn on automatically at a time you choose, on a weekday you choose
  • Turn off automatically at a time you choose
  • Run entirely in the cloud — it keeps working even if your laptop is off
Each person sets this up individually with their own Slack login and their own day/time. Nobody can accidentally change someone else's status.

Before you start

You'll need:
  • A Slack account in our workspace
  • A Google account (for Google Apps Script — free, no install needed, runs in your browser)
  • The installation link for your shared Slack App:
  • If you're a team member: ask your Slack Admin
  • If you're the Slack Admin: go to  api.slack.com/apps  → your app → Manage Distribution → Shareable URL

Step 1: Get your personal Slack token

    Open the installation link shared by [name/admin]
    Log in with your own Slack account if prompted
    Click Allow to authorize the app
    You'll see a User OAuth Token starting with xoxp-... — copy this somewhere safe temporarily (treat it like a password, so save it in your password manager for example)

Step 2: Generate your script using Claude

You'll use Claude to generate a ready-to-use script tailored to your own day off — no coding needed. This takes about 1 minute.
    Go to  claude.ai  and start a new conversation
    Copy and paste the prompt below:
I want to set up an automatic Slack status for my fixed recurring day off, using a Google Apps Script. Please first ask me: which day of the week is my fixed day off, what my Slack status text should say, which emoji to use, and what time the status should turn on and off. Then generate the complete, ready-to-paste Google Apps Script with my answers already filled into the CONFIG section.
    Answer Claude's questions about your day and preferences
    Copy the full script that Claude generates
    Go to  script.google.com  and click New project
    Delete any placeholder code in the editor and paste in your generated script
    Rename the project (click "Untitled project" at the top) to something like "My Slack Status Automator"

Step 3: Verify your settings

The script Claude generated already has your settings filled in. If you need to adjust anything later, find the CONFIG section near the top of the script:
const STATUS_TEXT = 'Your status message'; // e.g. 'Off on Mondays'
const STATUS_EMOJI = ':calendar:'; // any Slack emoji code
const WEEKDAY = ScriptApp.WeekDay.MONDAY; // your chosen day
const START_HOUR = 7; // 24-hour format
const END_HOUR = 22; // 24-hour format

Step 4: Store your token securely

Don't leave your token hardcoded in the script — store it separately instead:
    In the Google Apps Script editor, click the gear icon (Project Settings) on the left
    Scroll to Script Properties → click Add script property
    Set Property = SLACK_TOKEN , Value = the token you copied in Step 1
    Click Save script properties
    Go back to the editor (pencil icon)

Step 5: Activate the automation

    At the top of the Google Apps Script editor, use the function dropdown and select setupTriggers
    Click Run (▷)
    The first time, Google will ask you to authorize the script:
  • Click Review permissions
  • Choose your Google account
  • Click AdvancedGo to [project name] (unsafe)Allow
  • This warning appears because it's your own private script, not a published app — it's expected and safe
    Run setupTriggers again if the first run was interrupted by the authorization flow
    Check the Execution log at the bottom for a confirmation message

Step 6: Test it

    Select testNow from the function dropdown
    Click Run
    Check Slack — your status should now be set
    Run setStatusOff to clear it again manually, or just wait for your scheduled end time

Done! From now on, your status will turn on and off automatically every week on your chosen day.

Troubleshooting

Check the Execution log (bottom of the Apps Script editor) for a Slack API error message. The most common cause is a missing or incorrect token in Script Properties, or the users.profile:write scope not being added to the Slack App.
Just edit the CONFIG values at the top of the script and run setupTriggers again — it automatically replaces your old triggers with the new schedule.
Open  script.google.com , open your project, go to the clock icon (Triggers) on the left, and delete both triggers. Optionally also revoke the app's access in your Slack account under "Apps."
This script is built for a recurring weekly schedule. For one-off absences, it's simpler to just set your Slack status manually for that day.