General Questions
How do I change the schedule for sending messages?
How do I change the schedule for sending messages?
To change when messages are sent, edit the cron expressions in Cron syntax:Examples:Use crontab.guru to build and test your cron expressions.
.github/workflows/main.yml:7-8.Current schedule (Mexico CST):Remember to adjust the time logic in
bot.py:13 if your check-out time is after 18:00 UTC.Can I send messages to multiple WhatsApp groups?
Can I send messages to multiple WhatsApp groups?
Yes, but it requires modifying the code. Here are two approaches:Option 1: Multiple environment variablesOption 2: Comma-separated list
-
Add additional secrets in GitHub:
GROUP_ID_2GROUP_ID_3
-
Modify
bot.pyto loop through groups:
- Update
.github/workflows/main.ymlto include new secrets:
-
Set
GROUP_IDsecret as:[email protected],[email protected],[email protected] -
Modify
bot.py:
How do I customize the message content?
How do I customize the message content?
Edit the message text in Customization examples:Add emojis:Add department or role:Use dynamic timestamp:Multi-line formatting:Use
bot.py:13:Current message:\n for line breaks:What are the costs associated with this bot?
What are the costs associated with this bot?
The WhatsApp Attendance Bot has minimal to zero costs:GitHub Actions:
- Free tier: 2,000 minutes/month for private repositories
- Public repositories: Unlimited free minutes
- This bot uses approximately 1 minute/day = 30 minutes/month
- Cost: FREE (well within limits)
- Free tier: 50 messages/day
- This bot sends 2 messages/day (check-in + check-out)
- Cost: FREE for basic usage
- Basic: $9/month - 1,000 messages/day
- Pro: $29/month - 5,000 messages/day
- Enterprise: Custom pricing
If you send messages to multiple groups or increase frequency, ensure you stay within Ultramsg’s free tier limits (50 messages/day).
How reliable is the bot? Will messages always be sent on time?
How reliable is the bot? Will messages always be sent on time?
GitHub Actions Reliability:
- GitHub Actions scheduled workflows are generally reliable but not guaranteed to run at the exact scheduled time
- Typical delay: 0-10 minutes during normal load
- During high load: delays up to 30 minutes are possible
- GitHub makes no SLA guarantees for free tier scheduled workflows
-
Schedule slightly before actual time:
- Use workflow_dispatch for manual backup: If automated message fails, run manually from Actions tab
-
Monitor workflow runs:
Enable email notifications for failed workflows:
- GitHub Settings > Notifications > Actions
- Check “Send notifications for failed workflows”
- Inactive repository warning: GitHub disables scheduled workflows after 60 days of repository inactivity. Make a commit every 50 days to keep it active.
- Ultramsg has high uptime (>99%)
- WhatsApp connection can occasionally disconnect
- Check Ultramsg dashboard regularly to verify connection status
- Setting up monitoring/alerts
- Having a manual backup process
- Using a dedicated VPS with cron jobs for guaranteed timing
Technical Questions
Can I run this bot on a server instead of GitHub Actions?
Can I run this bot on a server instead of GitHub Actions?
Yes! The bot can run anywhere Python is available.Option 1: VPS with cron (Linux/Mac)
-
Clone the repository to your server:
-
Install dependencies:
-
Create a
.envfile: -
Modify
bot.pyto load .env (add at top): -
Set up cron jobs:
Add these lines (adjust timezone as needed):
- Open Task Scheduler
- Create two tasks for check-in and check-out
- Set triggers for your desired times
- Set action:
python C:\path\to\bot.py - Set environment variables in task properties
- More reliable timing (no GitHub delays)
- Full control over execution
- No 60-day inactivity issue
- Requires server maintenance
- Must ensure server is always running
- You manage security/updates
How do I add logging to track message history?
How do I add logging to track message history?
Add logging to For GitHub Actions:Logs are stored in Actions tab automatically. To save them persistently:
bot.py to keep records of sent messages:Can I use this with Telegram or other messaging platforms?
Can I use this with Telegram or other messaging platforms?
Yes! The architecture is similar, just change the API integration.For Telegram:
- Create a bot using @BotFather
- Get your bot token and chat ID
- Modify
bot.py:
- Update GitHub secrets:
TELEGRAM_BOT_TOKENTELEGRAM_CHAT_ID
- Create a Slack app and get webhook URL
- Modify
bot.py:
How do I test the bot without sending real messages?
How do I test the bot without sending real messages?
Option 1: Use a test WhatsApp groupAdd
- Create a separate WhatsApp group for testing
- Get its group ID from Ultramsg
- Temporarily update the
GROUP_IDsecret - Run workflow manually using
workflow_dispatch - Restore original
GROUP_IDwhen done
bot.py to support testing:DRY_RUN secret in GitHub (set to true for testing, false for production).Option 3: Local testing with mockNeed More Help?
If your question isn’t answered here:- Check the Troubleshooting Guide for common issues
- Review the Bot Function API Reference for technical details
- Check GitHub Actions logs in the Actions tab
- Review Ultramsg dashboard for API-specific issues
For Ultramsg-specific questions, visit Ultramsg Documentation or contact their support team.