[PR #3847] fix: fetch page name of notion wiki #24294

Closed
opened 2026-02-21 20:22:44 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/3847

State: closed
Merged: Yes


If you turn a page into wiki, the name of subpages will be placed in the ["properties"]["Page"]["title"] field.

Description

This pull request tries to fetch the page name in Notion wiki. Notion's API document does not mention "wiki". I found the pattern through experiments.

How to turn a page into wiki:
image
image

After that, try the search API:

curl -X POST 'https://api.notion.com/v1/search' \
  -H 'Authorization: Bearer {your_notion_secret_key}' \
  -H "Notion-Version: 2022-06-28" \
-H 'Content-Type: application/json'

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I tested it in practice.

Suggested Checklist:

  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/3847 **State:** closed **Merged:** Yes --- If you turn a page into wiki, the name of subpages will be placed in the `["properties"]["Page"]["title"]` field. # Description This pull request tries to fetch the page name in Notion wiki. [Notion's API document](https://developers.notion.com/reference/intro) does not mention "wiki". I found the pattern through experiments. How to turn a page into wiki: <img width="282" alt="image" src="https://github.com/badbye/dify/assets/3295865/58a26326-c624-4784-bf24-4f8889b14db8"> <img width="445" alt="image" src="https://github.com/badbye/dify/assets/3295865/19f111ca-60dd-427c-8025-c768d1f92e32"> After that, try the search API: ``` curl -X POST 'https://api.notion.com/v1/search' \ -H 'Authorization: Bearer {your_notion_secret_key}' \ -H "Notion-Version: 2022-06-28" \ -H 'Content-Type: application/json' ``` ## Type of Change - [X] Bug fix (non-breaking change which fixes an issue) # How Has This Been Tested? I tested it in practice. # Suggested Checklist: - [X] I have performed a self-review of my own code - [X] My changes generate no new warnings - [X] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:22:44 -05:00
yindo closed this issue 2026-02-21 20:22:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#24294