Create database
The Notion Create Database tool enables users to effortlessly create customized databases within Notion, defining precise properties and structures for efficient data management. It automates schema setup, allowing for versatile property types tailored to your workspace needs.
Features
- Supports a wide range of property types including title, rich text, number, select, multi-select, date, people, checkbox, URL, email, phone number, formula, relation, and rollup.
- Automatically adds a title property if none is specified, ensuring database integrity.
- Allows creation of databases at workspace or page level, providing organizational flexibility.
- Returns rendered Markdown that includes database structure, schema details, and SQLite table definitions for comprehensive visibility.
- Facilitates relational properties and rollups for advanced data aggregation and linkage across multiple databases.
Benefits
- Streamlines database creation within Notion, saving time and reducing manual setup errors.
- Enhances data organization by allowing custom properties that fit diverse business and project needs.
- Improves collaboration with easy inclusion of people properties and relations between databases.
- Offers detailed schema information and data source configurations to optimize database management and integration.
- Supports automation and integration workflows by providing structured and accessible database definitions.
Description
Creates a new Notion database with the specified properties. Use this tool when you need to create a new database that doesn't exist yet. The database schema is defined through the "properties" object. If no title property is provided, one will be automatically added with the name "Name". Each property should include a type and may have additional configuration based on the property type. Common property types:
- title: The main property (required, cannot be deleted)
- rich_text: Multi-line text
- number: Numeric values with optional formatting
- select: Single choice from options
- multi_select: Multiple choices from options
- date: Date with optional time
- people: User references
- checkbox: Boolean values
- url: Web links
- email: Email addresses
- phone_number: Phone numbers
- formula: Calculated values based on other properties
- relation: Links to pages in another database
- rollup: Aggregated values from related pages The tool returns a rendered Markdown representation of the created database including its structure, data source configuration with full schema details, and SQLite table definition. This provides complete visibility into the database that was created. Examples of creating databases:
- Create a minimal database with auto-added title property: { "properties": {} }
- Create a task database under a page: { "parent": {"page_id": "f336d0bc-b841-465b-8045-024475c079dd"}, "title": [{"text": {"content": "Project Tasks"}}], "properties": { "Status": { "type": "select", "select": { "options": [ {"name": "To Do", "color": "red"}, {"name": "In Progress", "color": "yellow"}, {"name": "Done", "color": "green"} ] } }, "Priority": { "type": "select", "select": { "options": [ {"name": "High", "color": "red"}, {"name": "Medium", "color": "yellow"}, {"name": "Low", "color": "green"} ] } }, "Due Date": {"type": "date", "date": {}}, "Assignee": {"type": "people", "people": {}} } }
- Create a workspace-level database with various property types: { "title": [{"text": {"content": "Company Directory"}}], "properties": { "Name": {"type": "title", "title": {}}, "Email": {"type": "email", "email": {}}, "Phone": {"type": "phone_number", "phone_number": {}}, "Department": { "type": "select", "select": { "options": [ {"name": "Engineering", "color": "blue"}, {"name": "Sales", "color": "green"}, {"name": "Marketing", "color": "purple"} ] } }, "Start Date": {"type": "date", "date": {}}, "Is Active": {"type": "checkbox", "checkbox": {}}, "Notes": {"type": "rich_text", "rich_text": {}} } }
- Create a database with relations (assuming target database exists): { "title": [{"text": {"content": "Tasks"}}], "properties": { "Project": { "type": "relation", "relation": { "database_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "type": "single_property", "single_property": {} } } } }
Parameters
4 parameters
| Name | Type | Description |
|---|---|---|
| propertiesrequired | object | The property schema of the new database. If no title property is provided, one will be automatically added. |
| parent | object | The parent under which to create the new database. If omitted, the database will be created as a private page at the workspace level. |
| title | array | The title of the new database, as a rich text object. |
| description | array | The description of the new database, as a rich text object. |