Automatically enrich your Notion book database with comprehensive metadata from Google Books API!
Simply add a book title + author (or just an ISBN) to your Notion database, click a button, and watch as all the missing details get filled in automatically - including ISBN, publication year, page count, publisher, description, ratings, and more.
Create a new Notion database with these required columns:
Column Name | Type | Description |
---|---|---|
Title | Title | The book's title |
Author | Rich Text | The book's author |
ISBN | Rich Text | Book's ISBN (auto-filled) |
Year Published | Number | Publication year (auto-filled) |
Page Count | Number | Number of pages (auto-filled) |
Publisher | Rich Text | Publisher name (auto-filled) |
Optional columns you can add for even more data:
- Description (Rich Text) - Book summary
- Categories (Multi-select) - Genres/subjects
- Average Rating (Number) - Google Books rating
- Ratings Count (Number) - Number of ratings
- Language (Rich Text) - Book language
- Subtitle (Rich Text) - Book subtitle
-
Create a Notion Integration:
- Go to https://www.notion.so/my-integrations
- Click "New integration"
- Give it a name like "Book Auto-Populator"
- Copy the Integration Token (starts with
secret_
)
-
Share Your Database:
- Open your book database in Notion
- Click the "..." menu → "Add connections"
- Select your integration
-
Get Your Database ID:
- Copy the URL of your database page
- Extract the database ID (the long string of letters/numbers after the last
/
and before any?
) - Example:
https://notion.so/myworkspace/a8aec43384f447ed84390e8e42c2e089?v=...
- Database ID:
a8aec43384f447ed84390e8e42c2e089
- Fork this Val to your account
- Set Environment Variables:
NOTION_API_TOKEN
= Your integration token from Step 2NOTION_DATABASE_ID
= Your database ID from Step 2
-
Add a test book to your Notion database:
- Enter just the Title and Author (like "The Great Gatsby" and "F. Scott Fitzgerald")
- OR just enter an ISBN (like "9780743273565")
-
Run the enrichment:
- Visit your Val URL:
https://your-val-name.web.val.run/
- Watch as the missing fields get automatically filled in!
- Visit your Val URL:
Method 1: Title + Author
- Add the book title and author to a new row
- The script will find and fill in ISBN, year, page count, publisher, etc.
Method 2: ISBN Only
- Add just the ISBN to a new row
- The script will find and fill in title, author, year, page count, publisher, etc.
- Perfect when you have a book in hand but don't want to type details!
Process all incomplete books:
GET https://your-val-name.web.val.run/
Check if everything is set up correctly:
GET https://your-val-name.web.val.run/status
Process just one specific book:
GET https://your-val-name.web.val.run/process/NOTION_RECORD_ID
See all available commands:
GET https://your-val-name.web.val.run/help
Want to connect this lookup database to your main reading tracker? Here's how:
-
In your main reading database, add a new property:
- Name: "Book Info"
- Type: Relation
- Related database: Your book lookup database
-
Add rollup properties to display the 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 reading list, just link it to the enriched record!
This tool pulls comprehensive metadata from Google Books API:
Always Filled:
- ✅ ISBN (prefers ISBN-13, falls back to ISBN-10)
- ✅ Publication Year
- ✅ Page Count
- ✅ Publisher
Often Available:
- 📝 Description/Summary
- 🏷️ Categories/Genres
- ⭐ Average Rating
- 📊 Number of Ratings
- 🌍 Language
- 📅 Full Publication Date
- 🔗 Google Books Preview Link
"System not properly configured" error:
- Check that both environment variables are set correctly
- Verify your Notion integration has access to the database
No books getting processed:
- Make sure you have books with Title+Author OR ISBN but missing other fields
- Check that your database column names match exactly (case-sensitive)
Books not found:
- Try adding more specific author information
- Some books may not be in Google Books database
- Check that Title and Author are spelled correctly
Manual Processing: The system only processes books when you visit the URL - no automatic background processing
Smart Matching: Uses both exact and relaxed search algorithms to find the best matches
Data Preservation: Only fills in empty fields - never overwrites your existing data
Expandable: Add any of the optional columns to capture even more book metadata
backend/index.ts
- Main HTTP endpoints and APIbackend/notion.ts
- Notion database integrationbackend/books.ts
- Google Books API integrationbackend/processor.ts
- Core processing logic
Ready to automatically enrich your book collection? Fork this Val and start building your ultimate book database! 📚✨