Email notifications for Home Instead care services - activity logs and schedule summaries.
The UniqueIQ client/family portal lets you view care notes and activity logs, but you have to manually log in to check for updates. This scraper:
- Logs into the UniqueIQ portal automatically
- Fetches the activity log for the current day
- Sends a nicely formatted HTML email when there are updates
- Tracks what's been sent to avoid duplicate emails
- Runs via cron every 10 minutes to catch updates throughout the day
Parses timesheet PDF attachments from Home Instead emails and sends a daily summary:
- Shows carer schedule for the next 7 days
- Merges data from multiple timesheet emails for complete coverage
- Alerts if there's a coverage gap (>2 hours between 9am-6pm)
- Alerts if no timesheet data exists for upcoming days
- Subject line shows today's carers with times (e.g., "Laura 09:00-13:00, Sulayha 13:00-18:00")
- Clone the repo and install dependencies:
npm install
npx playwright install chromium- Copy
.env.exampleto.envand fill in your credentials:
cp .env.example .env- Configure your
.env:
SITE_URL=https://portal.uniqueiq.co.uk/Account/Login?ReturnUrl=%2f
USERNAME=your-portal-email
PASSWORD=your-portal-password
EMAIL_TO=recipient@example.com
EMAIL_FROM=sender@example.com
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=your-gmail@gmail.com
SMTP_PASS=your-app-password
For Gmail, you'll need an App Password (requires 2FA enabled).
node scraper.jsnode scraper.js -f 15/01/2026node scraper.js -f 01/01/2026 -t 15/01/2026node scraper.js --forcenode schedule-notify.jsAdd to crontab:
crontab -eAdd these lines:
# Activity log - every 10 minutes
*/10 * * * * /path/to/run-scraper.sh
# Schedule summary - daily at 7am
0 7 * * * /path/to/run-schedule-notify.sh
The wrapper scripts handle logging and (for the scraper) killing any hung previous instance.
Optional settings in .env for schedule notifications:
# Coverage gap detection
COVERAGE_START_HOUR=9 # Start of coverage period (default: 9)
COVERAGE_END_HOUR=18 # End of coverage period (default: 18)
COVERAGE_MAX_GAP_MINUTES=120 # Max gap before alert (default: 120 = 2 hours)
# Missing timesheet alert
MISSING_DATA_ALERT_DAYS=4 # Alert if no data within X days (default: 4)scraper.js- Activity log scraperschedule-notify.js- Schedule notification from timesheet emailsrun-scraper.sh- Cron wrapper for scraper (with kill logic)run-schedule-notify.sh- Cron wrapper for schedule notificationssent-emails.json- Tracks sent activity emails (auto-created)scraper.log- Scraper execution log (auto-created)schedule-notify.log- Schedule notification log (auto-created)
MIT