TL;DR
To build a time-off tracker with Claude, describe your leave types, how days accrue, and who approves whom. Claude builds requests, an approval queue, balances kept as a ledger, and a calendar of who is out. floo hosts it behind invite-only sign-in, so the app always knows who is asking and who may approve.
- Approval rules come from a manager table plus the signed-in email.
- Balances are a ledger of accruals, requests, and adjustments.
- A Friday job sends managers next week's absences.
Time off usually lives in three places: a chat message asking, a calendar entry, and a spreadsheet of balances someone updates monthly. A small app Claude builds puts the request, the approval, and the balance in one record.
1. Describe the policy
Build a time-off tracker. Leave types: vacation, sick, and unpaid. Vacation accrues 1.5 days per month; sick leave is 10 days per year, reset on January 1. An employee requests a date range and a type. Their manager approves or declines with a note. Approved requests subtract from the balance; half days are allowed. Everyone can see a team calendar of who is out, without the leave type. Admins can import the employee list with each person's manager and starting balances. Every Friday at 3pm New York time, email each manager who on their team is out next week.
The line "without the leave type" matters: the team sees that someone is out, not why.
2. Host it
[app]
name = "time-off"
access_mode = "accounts"
[services.web]
type = "web"
path = "."
port = 3000
ingress = "public"
[managed.default]
type = "postgres"
[cron.next-week]
schedule = "0 20 * * 5"
command = "node scripts/next-week-summary.js"
service = "web"
- Sign-in: every request carries
X-Floo-User-Email,X-Floo-User-Name, andX-Floo-User-Role. App admins (--role admin) manage the employee list; everyone else is a member. - Schedule:
0 20 * * 5is Friday 8pm UTC, 3pm in New York in winter. - Email key:
floo env set EMAIL_API_KEY --stdin --app time-off.
Invite the company with floo apps invite person@example.com --role member --app time-off, and give HR --role admin.
3. Test the rules
Ask Claude for tests before anyone uses it:
- A person cannot approve their own request.
- A manager cannot approve someone outside their team.
- A request larger than the balance is refused, unless it is unpaid.
- Declining or cancelling an approved request gives the days back.
Things to get right
- Count working days, not calendar days. Decide how public holidays count and write it down in the prompt.
- Keep the history. Every approval and decline records who and when.
- Privacy by default. Sick leave notes are visible to the employee, their manager, and admins only.
For the general pattern of turning an approval process into an app, see how to automate an internal process with Claude.
Frequently asked questions
Can Claude build a time-off or PTO tracker?
Yes. Describe the leave types, how days accrue, who approves whom, and what the team needs to see. Claude builds the request form, the approval queue, balances, and a calendar of who is out. floo runs it with Postgres and invite-only sign-in that tells the app who each person is.
How does the app know who can approve?
Store each person's manager in the app's own table, keyed by email. floo passes the signed-in email in X-Floo-User-Email on every request, so the app looks up whether the person approving is that employee's manager.
How should balances be stored?
As a ledger: accruals add days, approved requests subtract them, and adjustments are their own rows with a note. The balance is the sum, so it can always be explained.