• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
pchinjr

pchinjr

notion_weekly_report

Public
Like
notion_weekly_report
Home
Code
10
storage
1
.env.example
.gitignore
.vtignore
AGENTS.md
PLAN.md
README.md
deno.json
notion_weekly_report.test.ts
C
notion_weekly_report.ts
Branches
1
Pull requests
Remixes
History
Environment variables
6
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
PLAN.md
Code
/
PLAN.md
Search
…
Viewing readonly version of main branch: v35
View latest version
PLAN.md

Notion Life Tracker Plan

What we've built so far

  • A Notion database for blood sugar readings
  • A Val Town script that pulls the last 7 days of entries
  • Weekly stats (avg/min/max, completion rate, streak, badges)
  • A friendly email report sent on a schedule

Why this works well

  • We only query Notion for a small time window (fast even as Notion grows)
  • We compute the rollup once per week and send it as a summary
  • We can reuse the same pattern for other life areas (exercise, meals, goals)

Next step: store rollups in SQLite

We’ll store weekly rollups (badges, streaks, XP) in Val Town’s SQLite so we can:

  • build monthly and yearly summaries without re-reading Notion
  • compare across categories (e.g., blood sugar vs exercise)
  • keep a long-term history even if we rename Notion pages

Proposed storage shape

  • weekly_rollups: one row per category per week
  • badge_events: a history of badges earned

Each rollup stores:

  • category (e.g., blood_sugar)
  • period start/end (YYYY-MM-DD)
  • streak, completion rate, XP
  • badges as JSON
  • summary stats as JSON

How new trackers fit in

For each new Notion database:

  1. Add a small “collector” val that maps entries into a shared event format.
  2. Reuse the rollup logic and write weekly results to SQLite.
  3. Generate emails or dashboards from the stored rollups.

This keeps the system simple while still scaling to many life areas.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.