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

Add-NotionHeaderToBlock

SYNOPSIS

Adds a Notion header block to a specified parent block.

SYNTAX

Params

Add-NotionHeaderToBlock -Text <TypeName> -Color <notion_color> -Level <Int32> -is_toggleable <Boolean>
 -Parent <notion_block> [-ProgressAction <ActionPreference>] [<CommonParameters>]

Object

Add-NotionHeaderToBlock -Parent <notion_block> -InputObject <Heading> [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

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.

EXAMPLES

EXAMPLE 1

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.

EXAMPLE 2

$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.

PARAMETERS

-Color

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

-InputObject

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

-is_toggleable

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

-Level

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

-Parent

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

-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

-Text

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

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

NOTES

RELATED LINKS

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