Update NotionPageProperty - fasteiner/Notion GitHub Wiki


Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://developers.notion.com/reference/patch-page schema: 2.0.0 Type: Command

Update-NotionPageProperty

SYNOPSIS

Updates properties of a Notion page.

SYNTAX

Update-NotionPageProperty [-PageId] <String> [[-title] <Object[]>] [[-properties] <Hashtable>]
 [[-in_trash] <Boolean>] [[-archived] <Boolean>] [[-icon] <notion_icon>] [[-cover] <notion_file>]
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Update-NotionPageProperty function updates various properties of a Notion page, such as title, properties, icon, and cover image. It can also archive or delete the page.

EXAMPLES

EXAMPLE 1

Update-NotionPageProperty -PageId "some-page-id" -title "New Title" -properties @{Property1="Value1"} -archived $true

PARAMETERS

-archived

Set to true to archive the page. Set to false to unarchive the page.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-cover

A cover image for the page. Only external file objects are supported.

Type: notion_file
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-icon

A page icon for the page. Supported types are external file object or emoji object.

Type: notion_icon
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-in_trash

Set to true to delete the page. Set to false to restore the page.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-PageId

The ID of the page to update. This parameter is mandatory.

Type: String
Parameter Sets: (All)
Aliases: Id

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-properties

The properties of the page. This should be a hashtable.

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: @{}
Accept pipeline input: False
Accept wildcard characters: False

-title

The title of the page. This can be a string or a rich_text object.

Type: Object[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

notion_page

NOTES

This function requires the Invoke-NotionApiCall function to be defined.

RELATED LINKS

https://developers.notion.com/reference/patch-page

⚠️ **GitHub.com Fallback** ⚠️