PipedreamHQ / PipedreamHQ/pipedream

[BUG] Notion to markdown with children edge case

Open
#18,093 2 comments 0 reactions 0 assignees View on GitHub
bug question triaged
Dominant language
JavaScript
Stars
11.7k
Forks
5.8k
Avg merge
3d 10h
Merged PRs (30d)
102

Description

**Describe the bug**
When retrieving a notion block with markdown and retrieving children, the block you request is given in the `markdownContent` json under the key `parent` while the children are listed with keys matching their block titles.
If a child happens to be named `parent`, this will override the actual parent page you are retrieving.

**To Reproduce**
1. Create a notion page - add some unique content
2. Create a subpage and title it `parent` - add some unique content
3. Run action `notion-retrieve-block` with block id of page created in step 1, and `retrieveMarkdown` true and `retrieveChildren` "Sub-Pages Only"
4. Observe ret.markdownContent.parent has the content of the subpage named `parent` and only that

**Expected behavior**
I expect for both/all pages to be in the markdown content- what is currently `parent` (the retrieved block) could be keyed by its actual title instead just like the subpages maybe. This bug might extend even to nested subpages that have the same title as each other?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.