-
Notifications
You must be signed in to change notification settings - Fork 1
New NotionDatabase
Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://developers.notion.com/reference/create-a-database schema: 2.0.0 Type: Command
Creates a new Notion database.
New-NotionDatabase [[-parent_obj] <Object>] [[-title] <Object[]>] [-properties] <Hashtable>
[-ProgressAction <ActionPreference>] [<CommonParameters>]
The New-NotionDatabase function creates a new Notion database within the specified parent object, title, and properties. It converts the provided parameters to the appropriate types and makes an API call to create the database in Notion.
$parent = @{
type = "page_id"
page_id = "12345678901234567890"
}
$title = "My New Database"
$properties = @{
Name = @{
type = "title"
title = @{}
}
}
New-NotionDatabase -parent_obj $parent -title $title -properties $properties
This command creates a new Notion database within the specified parent page, title, and properties.
The parent object of the page. If not provided, a default parent will be used.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe properties objects of the database. This parameter is mandatory.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe title (or title object) of the database. Can be a string or an array of rich text objects.
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This function requires the Invoke-NotionAPICall and Remove-NullValuesFromObject helper functions, as well as the notion_database, notion_parent, rich_text, rich_text_text, and notion_databaseproperties types.
Home
Module-FAQ
SetupOfIntegration
Commands
- Connect-Notion
- ConvertTo-NotionObject
- Disconnect-Notion
- Invoke-NotionApiCall
- Block
- Add-NotionBlockToPage
- Get-NotionBlock
- Get-NotionBlockChildren
- New-NotionBlock
- Remove-NotionBlock
- Update-NotionBlock
- _RichText
- Bookmark
- Breadcrumb
- BulletedListItem
- Callout
- ChildDatabase
- Code
- Column
- ColumnList
- Divider
- Embed
- Equation
- File
- Heading
- Image
- LinkPreview
- NumberedListItem
- Paragraph
- Quote
- Synced
- Table
- TableOfContents
- TableRow
- ToDo
- Toggle
- Video
- Database
- Emoji
- File
- Page
- Parent
- User
Classes
- Block
- Comment
- Database
- Database
- DatabaseProperties
- Emoji
- File
- General
- Page
- page
- page_reference
- PageProperties
- Parent
- Unfurl attribute
- User
Enums
- notion_color
- icontype
- Block
- blocktype
- RichText
- rich_text_type
- rich_text_mention_type
- Type
- MentionType
- DatabaseProperties
- File
- PageProperties
- Parent
- Properties
- User