Daily Slack Message — package
Files included:
- data/messages.csv # example CSV; edit with your dates and messages
- send_slack_message.py # script that reads the CSV and posts today's message to Slack (interprets date in IST)
- requirements.txt # Python dependency
- .github/workflows/daily-message.yml # GitHub Actions workflow scheduled to run at 06:00 IST daily
How to use:
- Edit
data/messages.csvwith the dates (YYYY-MM-DD) and messages you want. - Create a Slack Incoming Webhook in your Slack workspace and set it as the repository secret
SLACK_WEBHOOK_URL.- GitHub: Settings -> Secrets and variables -> Actions -> New repository secret
- Commit and push this repo to GitHub. The workflow will run daily at 06:00 IST.
- You can trigger the workflow manually via Actions -> Run workflow (workflow_dispatch) for testing.
Notes:
- The script converts current UTC time to IST (UTC+5:30) and looks for that date in the CSV.
- If you prefer to use a Slack Bot token and chat.postMessage (to DM yourself), I can provide an alternative script.
- Do NOT put secrets in the repo; use GitHub Secrets instead.