Meeting hours → Samlla
- What it measures: total meeting time each day, without double-counting overlapping events.
- What you need: a Samlla account (Free is enough), consent to processing health data in Samlla, a Samlla API key, and Google Calendar.
- Runs on: Google Apps Script, even while your computer is off.
- Time: about 10 minutes.
- What leaves your calendar: only the number of hours. No titles, guests, descriptions, locations, or links.
Copy the whole block below and paste it into Claude, ChatGPT, or another AI assistant.
I want to see in Samlla how many hours Google Calendar meetings took each
day. Build this for me in Google Apps Script.
I am not a programmer: choose the simplest solution that runs by itself,
and guide me step by step. Answer in my language.
Technical surface
- Use only the built-in CalendarApp, not the Advanced Calendar Service.
- Read the calendar through CalendarApp.getDefaultCalendar().getEvents(...).
Calendar access must be read-only.
- Use my timezone — default to the project/script timezone — even if the
calendar itself uses a different timezone.
What should happen
- Once a day, one number appears in Samlla: how many hours meetings took
the previous day. The unit is h, rounded to the nearest 0.25 h.
- Count only events that have at least one other guest or are invitations I
accepted. Do not count declined invitations, all-day events, or personal
busy blocks without guests. An invitation that is unanswered or marked
“maybe” counts when it has at least one other participant; only a declined
invitation is excluded. Use CalendarApp.GuestStatus, including INVITED,
MAYBE, and NO, to check my status.
- A day runs from midnight to midnight in my timezone. Clip events to the
day boundaries. Merge overlapping intervals first so occupied time is
counted only once. Split a meeting that crosses midnight between days.
Only then round the day's total to the nearest 0.25 h.
- A day with no meetings gets no entry: a missing entry means 0. If the
result for a day that has an entry drops to 0, the automation deletes it.
If the rounded result is 0 — for example after a 5-minute meeting — treat
it as a zero day: do not create an entry, and delete an existing one.
- If the automation misses several days, it fills them on its next run.
Running it again never creates duplicates, and a changed result updates
the existing entry.
- A calendar-read error is not 0: for that day the automation must not
create, update, or delete an entry, and it reports the problem.
- On first run, it backfills history (ask me how many days; default to 30).
- Everything goes to one tracker named “Meeting hours” with one numeric
metric whose unit is h. If it does not exist, the automation creates it.
Privacy
- Only the daily number of hours goes to Samlla. Meeting titles, guests,
descriptions, locations, and links must not leave Calendar or appear in
logs.
- Store the Samlla API key as the `SAMLLA_API_KEY` Script Property; never
put it in the code.
Spirit
This is observation, not a goal. No thresholds, streaks, alerts, or judgments
such as “too many meetings”. Samlla shows the history; the conclusions are mine.
How I will verify it works
Before I enable the automation permanently, I want to run it once for the last
2 closed days and compare the numbers in Samlla with Google Calendar.
Before you begin, ask me at most 3 questions at a time. If I answer “defaults”,
assume CalendarApp, the project/script timezone, a 06:00 schedule, and 30 days
of history.
Technical facts about Samlla (API, response shapes, limits, pitfalls) are at https://samlla.app/llms.txt. Read them before writing code and stick to them instead of guessing.