-
Notifications
You must be signed in to change notification settings - Fork 1
Edit NotionDatabase
Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://developers.notion.com/reference/patch-database schema: 2.0.0 Type: Command
Edit the properties, title, and description of an existing Notion database.
Edit-NotionDatabase [-DatabaseId] <String> [-title <Object[]>] [-properties <Hashtable>]
[-description <Object[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
The Edit-NotionDatabase function allows you to edit the properties, title, and description of an existing Notion database.
$title = "New Database Title"
$properties = @{
"Property1" = @{
"name" = "New Property Name"
"type" = "text"
}
"PropertyToRemove" = $null
}
$description = "This is a new description for the database."
Edit-NotionDatabase -DatabaseId "your-database-id" -title $title -properties $properties -description $description
This command overwrites the title and description and edits the properties of the specified Notion database.
$database = Get-NotionDatabase -DatabaseId "your-database-id"
$db_properties = $database.properties
$db_properties.PropertyToRemove = $null
Edit-NotionDatabase -DatabaseId "your-database-id" -properties $db_properties
This command removes the "PropertyToRemove" property from the specified Notion database.
The ID of the Notion database to be edited.
Type: String
Parameter Sets: (All)
Aliases: Id
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseAn array of objects / a single object or string representing the description of the database. Each object can be a string or a rich_text object.
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
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: FalseA hashtable representing the properties of the database. Use null values to remove properties.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseAn array of objects / a single object or string representing the title of the database. Each object can be a string or a rich_text object.
Type: Object[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
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 function to make API calls to Notion.
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