Change slack's status by Pikud HaOref alerts
781
Automatically updates your Slack status when a Pikud HaOref (Israeli Home Front Command) alert is active in your city.
users.profile:writexoxp-* tokencp .env.example .env
Edit .env:
SLACK_TOKEN=xoxp-your-token
ALERT_CITY=תל אביב # Hebrew, exact match with Pikud HaOref city name
npm install
npm start
Or with Docker — edit docker-compose.yml to set your token and city, then:
docker compose up -d
docker compose stop # graceful shutdown, restores your Slack status
Note: Must run from an Israeli IP. The Pikud HaOref API blocks international requests.
| Variable | Default | Description |
|---|---|---|
SLACK_TOKEN | required | One or more xoxp-* tokens (comma-separated), each with users.profile:write |
ALERT_CITY | required | City name in Hebrew, exact match |
POLL_INTERVAL | 5000 | Polling interval in ms |
HTTP_PROXY | — | HTTP proxy (e.g. for routing through an Israeli IP) |
ALERT_STATUS_EMOJI | :rotating_light: | Emoji for category 1 alerts |
ALERT_STATUS_TEXT | Taking cover! Alert in my area! | Status text for category 1 alerts |
WARNING_STATUS_EMOJI | :warning: | Emoji for non-category-1 alerts |
WARNING_STATUS_TEXT | Might need to take cover soon | Status text for warnings |
ALERT_CITY must match Pikud HaOref's spelling exactly (Hebrew). If your status isn't triggering, check the logs — when an alert is active the service logs the title and description, which can help verify the city name.
npm test # run tests
MOCK_ALERTS_FILE=src/alerts.json npm start # run with mock alert data
Content type
Image
Digest
sha256:4a02e6d3d…
Size
53.2 MB
Last updated
8 months ago
docker pull jochman/slack-alert