Skip to content

Repository files navigation

🌊 flowy-sync

Automated daily attendance for Flowy Team Site, powered by WhatsApp reminders and simple command confirmations.

flowy-sync helps you never miss an attendance tick while you're already working. No browser needed, just confirm from WhatsApp with simple commands.

Core features

  • 🔔 Daily weekday reminder — every weekday morning you get a WhatsApp nudge asking where you're working from. Reply with /work <location> to confirm. If you don't reply, it falls back to your default location (office on Monday, home otherwise).
  • Automatic clock in / out — on weekdays it clocks you in around 8:00 AM and clocks you out around 5:00 PM automatically (times configurable via CLOCK_IN_TIME / CLOCK_OUT_TIME), with a small random jitter so it doesn't look robotic.
  • Force clock in outside working hours — working weekends or late nights? /workf <location> clocks you in immediately, bypassing the schedule. You then clock out manually with /out. While you're working outside hours, the bot reminds you every hour (via WhatsApp) so you don't forget to clock out.
  • 📊 Live status/status reads your real attendance state straight from the Flowy site (not just memory), so it always reflects reality.

Note

This bot exists to solve one everyday problem: forgetting to clock in/out attendance while you're already working. It automates the manual tick on the Flowy team site so you don't lose attendance records on busy days, it does not fake work or misrepresent your hours.

flowysync.mov

📲 WhatsApp Commands

Command Description
/work <location> Set work location for auto clock-in (e.g. /work office)
/workf <location> Force clock in immediately (bypasses schedule)
/out Force clock out (use after a force clock-in)
/status Check your live attendance status
/cancel Cancel today's attendance entry
/help Show available commands

🛠 Tech Stack

Layer Tech
Runtime Bun
HTTP Server ElysiaJS
WhatsApp Gateway WAHA

⚠️ Prerequisites

You need two WhatsApp numbers:

  • Primary — your personal number. This is the number you use to chat with the bot (send /work, /status, etc.).
  • Secondary — a dedicated number used exclusively by the bot to send messages, reminders, and notifications. Do not use your primary number for this; the WAHA session stays active 24/7 and will conflict with your normal WhatsApp usage. Use a separate SIM or a virtual number.

🚀 Deployment

Option A — One-liner deploy (recommended)

chmod +x deploy.sh
./deploy.sh

The script will handle env preparation, build, and start everything.

Option B — Manual Docker Compose

Step 1 — Prepare env

cp .env.example .env

Edit .env and fill in your values. You only need to configure up to around line 50 (the "MOST LIKELY YOU NO NEED TO MODIFY" section) — everything below that is WAHA defaults you can leave alone. Key vars to set:

  • WAHA_API_KEY
  • HMAC_KEY
  • PHONE_NUMBER (your primary number)
  • USER_EMAIL / USER_PASSWORD (Flowy login)
  • CLOCK_IN_TIME / CLOCK_OUT_TIME
  • TZ (defaults to Asia/Kuala_Lumpur)

Step 2 — Build & start

docker compose up -d --build

Step 3 — Configure WAHA Dashboard

Open http://localhost:3000/dashboard and log in.

#can be re-set in .env
username: admin
password: admin123

Worker setup

  1. Start the Worker.
  2. Paste your WAHA_API_KEY (from .env) into the API key field.
  3. Save.

Session setup

  1. Click the configuration (gear) icon on the default session.

  2. Set the Webhook URL to:

    http://webhooks:3001/webhooks/waha
    
  3. Enable HMAC and paste your HMAC_KEY (from .env).

  4. Start (or restart) the session.

  5. If it's your first time, scan the QR code with your secondary number's WhatsApp (Linked Devices → link with camera).

That's it — the bot is live.

🔄 Updating after a code change

If you edit the code, just rebuild the app service (the WAHA session stays authenticated, so no re-scan needed):

# must be in project dir
docker compose up webhooks -d --build

❓ Troubleshooting

If WhatsApp commands like /help or /work are not responding, try restarting the containers:

docker compose down
docker compose up -d --build

About

Self-hosted FlowyTeam attendance automation through WhatsApp

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages