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

pchinjr

notion_weekly_report

Public
Like
notion_weekly_report
Home
Code
7
.env.example
.gitignore
.vtignore
AGENTS.md
README.md
deno.json
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
/
README.md
Code
/
README.md
Search
…
Viewing readonly version of main branch: v11
View latest version
README.md

Notion Blood Sugar Weekly Rollup (Val Town)

This repo contains a Val Town-ready script that:

  • queries a Notion database for the last 7 days of blood sugar entries
  • computes simple stats (avg/min/max, count, missing entries)
  • emails a weekly rollup

1) Create the Notion database

Create a new database in Notion (table view is easiest) with these properties:

  • Entry (Title)
  • Created Time (Text) (e.g., January 13, 2026 2:29 PM)
  • Measurement Date (Date) (e.g., January 13, 2026)
  • Blood Sugar Level (Number)
  • Notes (Text) (optional)

You can name the database anything (e.g., "Blood Sugar Log").

2) Create a Notion integration

  1. Go to https://www.notion.so/my-integrations and create a new integration.
  2. Copy the Internal Integration Token.
  3. Open your database in Notion, click Share, and invite the integration.

Database ID

Open the database in the browser and copy the 32‑character ID in the URL.

3) Configure Val Town

Create a new Val in Val Town and paste notion_weekly_report.ts.

Add these secrets in Val Town (Settings → Secrets):

  • NOTION_TOKEN
  • NOTION_DATABASE_ID
  • REPORT_TO
  • REPORT_FROM

4) Schedule the report

In Val Town, schedule the Val to run weekly at 9:30am on Tuesdays (EST).

Suggested cron (set Val Town timezone to EST):

30 9 * * 2

5) Customize

  • Adjust the stats, date range, or email formatting in notion_weekly_report.ts.
  • If you prefer different property names, update them in the script.
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.