pipedream
pipedream copied to clipboard
[Action update] Notion - Add Block to Parent
App
Notion - Append block to parent - rename to Add Block to Parent
Actions
Please add an additionalProp for Position, with Prepend to top and Append to bottom as options, with Append to bottom as default.
Would love for the Notion action to have a "Prepend to top" option along with the current "Append to bottom" for adding to an existing page
@jcortes Thanks for the quick turnaround!
Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.
Please check the test report below for more information https://vunguyenhung.notion.site/Action-update-Notion-Add-Block-to-Parent-16e0e691119942cd82a46a04976ede8a
Hi @vunguyenhung about: But I see the content got added after the first block, not on the top that's the only way I saw we can put the blocks as prepend unfortunately. Let me know if there is a another way so I can make those changes, thanks!
Hi @jcortes, if you think it's not possible to prepend the block correctly, could you share the details in comment? Then I will move this ticket to blocked.
Could you try to check the last time if the feature is possible? If it is not then I think users would get confused and raise new issues if we release this anyway, so it's better to not releasing this.
@vunguyenhung Sure, basically in the docs here says this:
Existing blocks cannot be moved using this endpoint. Blocks are appended to the bottom of the parent block.
To append a block in a specific place other than the bottom of the parent block, use the "after" parameter and
set its value to the ID of the block that the new block should be appended after. Once a block is appended
as a child, it can't be moved elsewhere via the API.
So there is no way to move a block to the top because there will be no ID for an after reference, so what I ended up doing was to reference the ID of the first block in the list to append after that.
Now according to this other doc endpoint
Updating children
A block's children CANNOT be directly updated with this endpoint.
Instead use [Append block children](https://developers.notion.com/reference/patch-block-children)
to add children.
I was thinking about updating the whole list of blocks but that's not possible as the first doc mentioned
Thanks @jcortes. Clear to me.
I'll move this one to blocked.