Picture of the author

Notion Comments

Create Notion Comments

A comment object can be instantiated with Comment::fromText(...).

use FiveamCode\LaravelNotionApi\Entities\Comment;

$comment = Comment::fromText('This is a comment');
$comment = Comment::fromText($richTextObject); // `RichText::class` instance

This comment can be added to Notion by using one of the following methods.

Add Comments to Pages

A page_id is required for adding your $comment to a Notion Page.

Notion::comments()
    ->onPage('cbf6b0af6eaa45ca97159fa147ef6b17')
    ->create(Comment::fromText('Hello world'));

Add Comments to existing Discussions

A discussion_id is required for adding your $comment to an existing Discussion.

Notion::comments()
    ->onDiscussion('abf6b0af6eaa45ca97159fa147ef6b17')
    ->create(Comment::fromText('Hello World'));

Create Comments in Blocks

Not supported by Notion

At the moment, Notion does not provide a way to create comments directly in blocks. They can only created in existing discussions or on pages.

Previous
Fetch Comments