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

nucky

book-lookup-browser

web app that lets you look up books with title+author or ISBN
Remix of nucky/book-lookup-notion
Public
Like
book-lookup-browser
Home
Code
4
backend
4
frontend
1
shared
1
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
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
5/27/2025
Viewing readonly version of main branch: v3
View latest version
README.md

Notion Book Database Auto-Populator

This Val automatically enriches your existing "val Book Lookup" database by fetching comprehensive metadata from Google Books API.

How It Works

You already have the perfect setup! Your "val Book Lookup" database contains:

  • Title βœ“
  • Author βœ“
  • ISBN βœ“
  • Year Published βœ“
  • Page Count βœ“
  • Publisher βœ“

The Val will:

  1. Find records with Title + Author but missing other data
  2. NEW: Find records with ISBN but missing Title + Author
  3. Search Google Books API for metadata
  4. Fill in the empty fields automatically

Current Workflow

Your Enhanced Setup:

  1. Add books to "val Book Lookup" β†’ Enter either:
    • Title + Author (traditional method), OR
    • Just ISBN (new method!)
  2. Press the button (visit your Val URL) β†’ It fills in all available metadata
  3. Link to your main Books database via Relations/Rollups

Two Ways to Add Books:

Method 1: Title + Author (your existing workflow)

  • Add Title and Author to a new record
  • Script finds ISBN, year, page count, publisher, etc.

Method 2: ISBN Only (new capability!)

  • Add just the ISBN to a new record
  • Script finds Title, Author, year, page count, publisher, etc.
  • Perfect for when you have a book in hand but don't want to type the details

Your Enhanced Setup:

  1. Add books to "val Book Lookup" β†’ Enter either:
    • Title + Author (traditional method), OR
    • Just ISBN (new method!)
  2. Press the button (visit your Val URL) β†’ It fills in all available metadata
  3. Link to your main Books database via Relations/Rollups

Two Ways to Add Books:

Method 1: Title + Author (your existing workflow)

  • Add Title and Author to a new record
  • Script finds ISBN, year, page count, publisher, etc.

Method 2: ISBN Only (new capability!)

  • Add just the ISBN to a new record
  • Script finds Title, Author, year, page count, publisher, etc.
  • Perfect for when you have a book in hand but don't want to type the details

Metadata Currently Being Captured:

Your script pulls comprehensive data from Google Books API:

Core Fields (currently in your table):

  • βœ… ISBN - Prefers ISBN-13, falls back to ISBN-10
  • βœ… Year Published - Extracted from publication date
  • βœ… Page Count - Direct from Google Books
  • βœ… Publisher - Direct from Google Books
  • βœ… Description - Available (add column to see it)

Rich Metadata Available (add these columns to capture):

  • Subtitle (Rich text) - Book subtitle
  • Categories (Multi-select) - Genre/subject categories
  • Average Rating (Number) - Google Books rating
  • Ratings Count (Number) - Number of ratings
  • Language (Rich text) - Book language
  • Published Date (Rich text) - Full publication date
  • Preview Link (URL) - Google Books preview
  • Info Link (URL) - Google Books info page
  • Image Links (Rich text) - Book cover images (JSON)

Setup (Already Done!)

Your system is already configured! Just make sure:

  • NOTION_API_TOKEN points to your integration
  • NOTION_DATABASE_ID points to your "val Book Lookup" database

Usage

Manual Processing (Your Current Setup)

To process all incomplete records: Visit: https://your-val-url.web.val.run/

To check system status: Visit: https://your-val-url.web.val.run/status

To process a specific record: Visit: https://your-val-url.web.val.run/process/RECORD_ID

To see all available endpoints: Visit: https://your-val-url.web.val.run/help

Linking to Your Main Books Database

To connect your "val Book Lookup" to your main reading database:

  1. Add Relation Property to your main Books database:

    • Name: "Book Info"
    • Type: Relation
    • Related database: "val Book Lookup"
  2. Add Rollup Properties to show metadata:

    • ISBN: Rollup β†’ Book Info β†’ ISBN
    • Year: Rollup β†’ Book Info β†’ Year Published
    • Pages: Rollup β†’ Book Info β†’ Page Count
    • Publisher: Rollup β†’ Book Info β†’ Publisher

Now when you add a book to your main database, just link it to the corresponding record in "val Book Lookup"!

API Endpoints

  • GET / - Process all incomplete records
  • GET /status - Check configuration
  • GET /process/:recordId - Process specific record
  • GET /health - Health check

Files

  • /backend/index.ts - Main HTTP handler with manual trigger
  • /backend/notion.ts - Notion API integration with comprehensive metadata support
  • /backend/books.ts - Google Books API with extensive metadata extraction
  • /backend/processor.ts - Processing logic for enriching records

Benefits

βœ… Works with your existing setup
βœ… Comprehensive Google Books metadata (15+ fields available) βœ… Smart matching algorithm (exact + relaxed search) βœ… Only fills empty fields (preserves your data) βœ… Manual button-press execution (no unwanted automation) βœ… Links to your reading database via Relations/Rollups βœ… Expandable with more metadata columns (just add them to Notion)

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.