{"id":26691015,"url":"https://github.com/pripoliveira50/daily-bot","last_synced_at":"2026-05-06T18:36:43.709Z","repository":{"id":280012872,"uuid":"940757757","full_name":"pripoliveira50/daily-bot","owner":"pripoliveira50","description":"📱 Daily Slack Notification is an automated Slack bot that schedules and announces daily stand-up meetings, informing the team about who will be presenting. It uses GitHub Actions for automatic execution and cron scheduling.","archived":false,"fork":false,"pushed_at":"2025-03-26T15:04:30.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T18:45:09.685Z","etag":null,"topics":["automation","automation-tools","cron-job","cron-job-manager","cron-job-schedule","cron-jobs","github-actions","github-actions-ci","python-script","python3","slack","slack-api","slack-app","slack-webhook","slackbot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pripoliveira50.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-28T18:29:13.000Z","updated_at":"2025-03-26T15:09:13.000Z","dependencies_parsed_at":"2025-02-28T22:25:42.282Z","dependency_job_id":"1b9bce5a-79c2-4457-b567-ac06f7a3dd58","html_url":"https://github.com/pripoliveira50/daily-bot","commit_stats":null,"previous_names":["pripoliveira50/daily-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pripoliveira50/daily-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pripoliveira50%2Fdaily-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pripoliveira50%2Fdaily-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pripoliveira50%2Fdaily-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pripoliveira50%2Fdaily-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pripoliveira50","download_url":"https://codeload.github.com/pripoliveira50/daily-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pripoliveira50%2Fdaily-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265191187,"owners_count":23725278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","automation-tools","cron-job","cron-job-manager","cron-job-schedule","cron-jobs","github-actions","github-actions-ci","python-script","python3","slack","slack-api","slack-app","slack-webhook","slackbot"],"created_at":"2025-03-26T16:16:55.827Z","updated_at":"2026-05-06T18:36:38.688Z","avatar_url":"https://github.com/pripoliveira50.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Daily Slack Notification – The Daily Assistant for Slack\n\nThe **Daily Slack Notification** is an automated bot for Slack that schedules and announces the daily stand-up meeting, highlighting who will be responsible for the day's presentation. 🚀\n\nThis bot creates an API in Slack using a Slack App with the necessary permissions to send messages to a specific channel.\n\n---\n\n## 📌 How to Create a Slack API for This Bot?\n\nTo use this bot, you will need to create a Slack App and get the required tokens. Follow the official Slack documentation:\n🔗 [Create a Slack App](https://api.slack.com/apps)\n\nThe process is fully automated via GitHub Actions, allowing scheduled daily execution via cron jobs or manual execution whenever needed.\n\n---\n\n## 📌 Features\n\n- ✅ Automatic daily announcement in Slack.\n- ✅ Sequential selection of the presenter from the configured members.\n- ✅ Correct mention of the presenter in Slack (using user IDs).\n- ✅ Automated execution via GitHub Actions with scheduling (cron) support.\n- ✅ Manual execution via GitHub Actions `workflow_dispatch`.\n\n---\n\n## 🛠 Technologies Used\n\nThis project was developed using:\n\n- **Python 3.9**\n- **GitHub Actions** (for execution automation)\n- **Requests** (for integration with the Slack API)\n\n---\n\n## 📂 Project Structure\n\nThe project follows the structure below:\n\n```\n.\n├── .github/workflows/       # GitHub Actions configuration\n│   ├── ci.yaml              # Workflow for automated execution\n├── scripts/                 # Directory for Python scripts\n│   ├── daily_slack.py       # Script responsible for sending messages to Slack\n├── .gitignore               # File to ignore unnecessary files in the repository\n├── LICENSE                  # Project license\n├── README.md                # Project documentation\n```\n\n---\n\n## 🔄 Presenter Selection Logic\n\nThe daily presenter is selected sequentially, ensuring a fair rotation among members.\n\n### 📌 How Does It Work?\n\nThe script maintains a pre-configured list of team members (via `SLACK_MEMBERS`) and selects the next in line each day. When all members have presented, the order resets to the beginning.\n\n---\n\n### 🔹 Example:\n\nIf `SLACK_MEMBERS=\"U123456,U654321,U987654\"`, the presentation order will be:\n\n1️⃣ Day 1: U123456  \n2️⃣ Day 2: U654321  \n3️⃣ Day 3: U987654  \n4️⃣ Day 4: U123456 (restarts)\n\nThis logic ensures a fair rotation and prevents random selection.\n\n---\n\n## 🚀 Setup and Usage\n\n### 1️⃣ Prerequisites\n\nBefore running the script, ensure you have:\n\n- Python 3.9+ installed.\n- A Slack bot configured with permissions to send messages.\n- The following environment variables are configured in GitHub Actions:\n\n| Variable         | Description                                |\n|------------------|--------------------------------------------|\n| `SLACK_TOKEN`    | Slack authentication token                 |\n| `CHANNEL_ID`     | ID of the channel where the message will be sent |\n| `SLACK_MEMBERS`  | List of member IDs for presentation, separated by commas |\n\n💡 **How to get Slack user IDs?**  \nIf you need user IDs, use the Slack API:  \n🔗 [Get Slack User List](https://api.slack.com/methods/users.list)\n\n### 2️⃣ How to Run the Project Locally?\n\n1️⃣ Clone the repository:\n\n```sh\ngit clone https://github.com/your-username/daily-slack-notification.git\ncd daily-slack-notification\n```\n\n2️⃣ Create and activate a virtual environment:\n\n```sh\npython -m venv venv\nsource venv/bin/activate  # Linux/macOS\nvenv\\Scripts\\activate     # Windows\n```\n\n3️⃣ Install dependencies:\n\n```sh\npip install -r requirements.txt\n```\n\n4️⃣ Set environment variables:\n\n```sh\nexport SLACK_TOKEN=\"your_token_here\"\nexport CHANNEL_ID=\"your_channel_id_here\"\nexport SLACK_MEMBERS=\"U12345,U67890,U54321\"\n```\n\n💡 On Windows, use:\n\n```sh\nset SLACK_TOKEN=\"your_token_here\"\n```\n\n5️⃣ Run the script:\n\n```sh\npython scripts/daily_slack.py\n```\n\n---\n\n## 📅 Scheduling via GitHub Actions\n\nGitHub Actions allows bots to be automatically and manually executed.\n\n### 🔹 Automatic Execution\n\nThe bot can be scheduled to run at specific times using cron jobs in GitHub Actions.\n\n#### Example configuration (`.github/workflows/ci.yaml`):\n\n```yaml\nname: Daily Slack Notification\n\non:\n  schedule:\n    - cron: \"30 12 * * 1-5\"  # Runs at 12:30 PM (UTC) Monday to Friday\n  workflow_dispatch:  # Allows manual execution via GitHub Actions\n\njobs:\n  daily-slack-notification:\n    name: Send Slack Notification\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Set up Python\n        uses: actions/setup-python@v4\n        with:\n          python-version: \"3.9\"\n\n      - name: Install dependencies\n        run: pip install -r requirements.txt\n\n      - name: Run Python script\n        run: python scripts/daily_slack.py\n```\n\n🔹 **Note:** The cron job can be adjusted to run at different times and days as needed.\n\n---\n\n## ✅ Testing and Debugging\n\nIf you need to test or debug the code:\n\n1️⃣ Verify that environment variables are set correctly.  \n2️⃣ Test the Slack API manually using `requests.post`.  \n3️⃣ Use `print()` statements in the code to check variable values before sending the message.\n\n---\n\n## 🚨 Troubleshooting\n\n- **The bot is not sending messages to Slack**  \n  - Check if the `SLACK_TOKEN` is correct and active.  \n  - Ensure the bot is present in the correct channel (`#your-channel`).\n\n- **The bot is not running automatically**  \n  - Confirm that GitHub Actions is enabled in the repository.  \n  - Check the workflow history for possible errors.\n\n---\n\n## 🤝 How to Contribute\n\nPlease refer to our [Contribution Guide](CONTRIBUTING.md) to learn how to contribute to the project.\n\n---\n\n## 📄 License\n\nThis project is under the MIT License.\n\n\n💡 Developed to help agile teams keep their daily stand-ups organized! 🚀\n---\n\n🚀 Made with ❤️ by [Priscila Oliveira](https://github.com/pripoliveira50/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpripoliveira50%2Fdaily-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpripoliveira50%2Fdaily-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpripoliveira50%2Fdaily-bot/lists"}