Add NotionHeaderToBlock - fasteiner/Notion GitHub Wiki
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
Adds a Notion header block to a specified parent block.
Add-NotionHeaderToBlock -Text <TypeName> -Color <notion_color> -Level <Int32> -is_toggleable <Boolean>
-Parent <notion_block> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Add-NotionHeaderToBlock -Parent <notion_block> -InputObject <Heading> [-ProgressAction <ActionPreference>]
[<CommonParameters>]
The Add-NotionHeaderToBlock function creates a header block in Notion with specified properties such as text, color, level, and toggleability, and adds it to a given parent block. It can also accept an existing header object.
Add-NotionHeaderToBlock -Text "My Header" -Color "blue" -Level 1 -is_toggleable $true -Parent $parentBlock
This example creates a new header with the text "My Header", color "blue", level 1, and toggleable, and adds it to the specified parent block.
$header = New-NotionHeader -Text "My Header" -Color "blue" -Level 1 -is_toggleable $true
Add-NotionHeaderToBlock -InputObject $header -Parent $parentBlock
This example creates a new header object and then adds it to the specified parent block using the InputObject parameter.
The color of the header.
Type: notion_color
Parameter Sets: Params
Aliases:
Accepted values: blue, blue_background, brown, brown_background, default, gray, gray_background, green, green_background, orange, orange_background, pink, pink_background, purple, purple_background, red, red_background, yellow, yellow_background
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An existing header object to be added to the parent block.
Type: Heading
Parameter Sets: Object
Aliases: Object
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Indicates if the header is toggleable.
Type: Boolean
Parameter Sets: Params
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The level of the header (1-3).
Type: Int32
Parameter Sets: Params
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
The parent block to which the header will be added.
Type: notion_block
Parameter Sets: (All)
Aliases:
Required: True
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: False
The text content of the header.
Type: TypeName
Parameter Sets: Params
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.