Add-NotionBlockChildren

SYNOPSIS

Creates and appends new children blocks to the block using the block ID specified.

SYNTAX

Add-NotionBlockChildren [-Token] <String> [-BlockId] <String> [-BlockChildren] <PSObject> [<CommonParameters>]

DESCRIPTION

The Add-NotionBlockChildren cmdlet creates and appends new children blocks to an existing block. Once a block is appending to a block it can't currently be edited with the Notion API and must be edited directly in Notion. The command returns the block object that was created.

EXAMPLES

Example 1

PS C:\> $BlockChildren = @{ 
    [
        {
            "object" = "block"
            "type" = "heading_2"
            "heading_2" = @{
                "text" = @(
                            @{
                                "type" = "text"
                                "text" = { 
                                    "content" = "Lacinato kale" 
                                }
                            })
            }
        },
        {
            "object" = "block",
            "type" = "paragraph",
            "paragraph" = @{
                "text" = @(
                    @{
                        "type" = "text",
                        "text" = @{
                            "content" = "Lacinato kale is a variety of kale with a long tradition in Italian cuisine, especially that of Tuscany. It is also known as Tuscan kale, Italian kale, dinosaur kale, kale, flat back kale, palm tree kale, or black Tuscan palm.",
                            "link" = @{ 
                                "url" = "https://en.wikipedia.org/wiki/Lacinato_kale" 
                            }
                        }
                    }
                )
            }
        }
    ]
}
PS C:\> Add-NotionBlockChildren -Token "yoursupersecrettokenvalue" -BlockId "9bd15f8d-8082-429b-82db-e6c4ea88413b" -BlockChildren $BlockChildren

This command adds a header block followed by a paragraph block to the parent block.

PARAMETERS

-BlockChildren

Specifies an object containing the block children to add to the parent block.

Type: PSObject
Parameter Sets: (All)
Aliases:

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

-BlockId

Specifies a string containing the ID of the parent block.

Type: String
Parameter Sets: (All)
Aliases:

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

-Token

Specifies a string containing the integration token value.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
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

None

OUTPUTS

System.Object

NOTES