Organize Database
Transform unstructured Notion pages into a well-designed, queryable database.
Property Type Decision Guide
Choose the right property type -- LLMs frequently pick the wrong one:
| Data pattern |
Correct type |
Wrong choice (common mistake) |
| Fixed categories (status, priority) |
select |
rich_text (loses filtering) |
| Multiple tags per item |
multi_select |
select (only allows one) |
| References to other DBs |
relation |
rich_text (breaks linking) |
| Computed from relations |
rollup |
formula (can't aggregate across DBs) |
| True/false flags |
checkbox |
select with Yes/No (over-engineered) |
| Long-form content |
Page body (blocks) |
rich_text property (2000 char limit) |
Property Format Reference
Every property value MUST use the correct nested format. The Notion API rejects flat values.
// WRONG -- flat values (API will error or silently fail)
{
"Tags": "engineering",
"Status": "In Progress",
"Description": "Some text"
}
// CORRECT -- properly typed nested objects
{
"Tags": { "multi_select": [{ "name": "engineering" }] },
"Status": { "select": { "name": "In Progress" } },
"Description": { "rich_text": [{ "text": { "content": "Some text" } }] },
"Name": { "title": [{ "text": { "content": "Page title" } }] },
"Done": { "checkbox": true },
"Due Date": { "date": { "start": "2026-03-23" } },
"URL": { "url": "https://example.com" },
"Count": { "number": 42 },
"Contact": { "email": "user@example.com" }
}
Key gotcha: rich_text is an ARRAY of text objects, never a plain string.
Migration Pattern
Audit existing content -- find the pages to organize:
pages(action="search", query="<topic>") to locate scattered pages
- Read each page's blocks to understand content structure
- Identify common fields across pages (these become DB properties)
Design schema -- create the database with identified properties:
databases(action="create", parent_id="<parent_page_id>", title="...", properties={
"Name": { "title": {} },
"Category": { "select": { "options": [{ "name": "..." }] } },
"Tags": { "multi_select": { "options": [{ "name": "..." }] } },
...
})
- Start with 5-7 properties max. Users can add more later.
- Always include a
select for status/category -- it enables Notion's board view.
Bulk-create pages from existing content:
- For each source page, extract content and create a new DB entry:
pages(action="create", parent_id="<database_id>", properties={...}, content=[...])
- Preserve the original content as page body blocks
- Map existing content to the new properties
Archive old pages (only after user confirms migration looks correct):
blocks(action="delete", block_id="<old_page_block_id>") or move to archive page
- Never delete originals without explicit user confirmation
Verify the new database:
databases(action="query", database_id="<id>") to list all entries
- Present count and sample entries to user
When to Use
- User has scattered pages about a topic and wants them organized
- Existing flat pages need structure (tags, categories, status tracking)
- Converting a list-style page into a proper database
- Setting up a new organized workspace area
1---2name: organize-database3description: Transform unstructured Notion pages into a well-designed database with proper schema and migration4---56# Organize Database78Transform unstructured Notion pages into a well-designed, queryable database.910## Property Type Decision Guide1112Choose the right property type -- LLMs frequently pick the wrong one:1314| Data pattern | Correct type | Wrong choice (common mistake) |15|---|---|---|16| Fixed categories (status, priority) | `select` | `rich_text` (loses filtering) |17| Multiple tags per item | `multi_select` | `select` (only allows one) |18| References to other DBs | `relation` | `rich_text` (breaks linking) |19| Computed from relations | `rollup` | `formula` (can't aggregate across DBs) |20| True/false flags | `checkbox` | `select` with Yes/No (over-engineered) |21| Long-form content | Page body (blocks) | `rich_text` property (2000 char limit) |2223## Property Format Reference2425Every property value MUST use the correct nested format. The Notion API rejects flat values.2627```jsonc28// WRONG -- flat values (API will error or silently fail)29{30 "Tags": "engineering",31 "Status": "In Progress",32 "Description": "Some text"33}3435// CORRECT -- properly typed nested objects36{37 "Tags": { "multi_select": [{ "name": "engineering" }] },38 "Status": { "select": { "name": "In Progress" } },39 "Description": { "rich_text": [{ "text": { "content": "Some text" } }] },40 "Name": { "title": [{ "text": { "content": "Page title" } }] },41 "Done": { "checkbox": true },42 "Due Date": { "date": { "start": "2026-03-23" } },43 "URL": { "url": "https://example.com" },44 "Count": { "number": 42 },45 "Contact": { "email": "user@example.com" }46}47```4849Key gotcha: `rich_text` is an ARRAY of text objects, never a plain string.5051## Migration Pattern52531. **Audit existing content** -- find the pages to organize:54 - `pages(action="search", query="<topic>")` to locate scattered pages55 - Read each page's blocks to understand content structure56 - Identify common fields across pages (these become DB properties)57582. **Design schema** -- create the database with identified properties:59 ```60 databases(action="create", parent_id="<parent_page_id>", title="...", properties={61 "Name": { "title": {} },62 "Category": { "select": { "options": [{ "name": "..." }] } },63 "Tags": { "multi_select": { "options": [{ "name": "..." }] } },64 ...65 })66 ```67 - Start with 5-7 properties max. Users can add more later.68 - Always include a `select` for status/category -- it enables Notion's board view.69703. **Bulk-create pages** from existing content:71 - For each source page, extract content and create a new DB entry:72 `pages(action="create", parent_id="<database_id>", properties={...}, content=[...])`73 - Preserve the original content as page body blocks74 - Map existing content to the new properties75764. **Archive old pages** (only after user confirms migration looks correct):77 - `blocks(action="delete", block_id="<old_page_block_id>")` or move to archive page78 - Never delete originals without explicit user confirmation79805. **Verify** the new database:81 - `databases(action="query", database_id="<id>")` to list all entries82 - Present count and sample entries to user8384## When to Use8586- User has scattered pages about a topic and wants them organized87- Existing flat pages need structure (tags, categories, status tracking)88- Converting a list-style page into a proper database89- Setting up a new organized workspace area