-
Notifications
You must be signed in to change notification settings - Fork 1
ConvertTo NotionObject
fasteiner edited this page Feb 22, 2025
·
1 revision
Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://developers.notion.com/reference/update-property-schema-object schema: 2.0.0 Type: Command
Converts an object to a TypeScript Notion object.
ConvertTo-NotionObject [-InputObject] <Object> [-ProgressAction <ActionPreference>] [<CommonParameters>]
This function takes an object and converts it to a TypeScript Notion object.
$object = @{ object = "block"; type = "code" }
$convertedObject = ConvertTo-NotionObject -Object $object
Returns an block object of type "code".
$object = @{ object = "list"; results = @(@{ object = "block"; type = "paragraph" }, @{ object = "block"; type = "heading_1" }) }
$object | ConvertTo-NotionObject
Returns a list object with two block objects of type "paragraph" and "heading_1".
$object = @{ object = "block"; type = "bookmark" }
ConvertTo-NotionObject -InputObject $object
Returns a block object of type "bookmark".
The object to be converted.
Type: Object
Parameter Sets: (All)
Aliases: Object
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
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: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
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