Added the notion integration, which keeps showing 0 authorized pages, but I already authorized the integrated page on notion #4404

Closed
opened 2026-02-21 18:06:15 -05:00 by yindo · 16 comments
Owner

Originally created by @jiegod on GitHub (Jul 3, 2024).

Originally assigned to: @JohnJyong on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

Version 0.6.12-fix1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Added the notion integration, which keeps showing 0 authorized pages, but I already authorized the integrated page on notion
image

image

✔️ Expected Behavior

dify integrates the notion page and displays notion files normally

Actual Behavior

image image
Originally created by @jiegod on GitHub (Jul 3, 2024). Originally assigned to: @JohnJyong on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version Version 0.6.12-fix1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Added the notion integration, which keeps showing 0 authorized pages, but I already authorized the integrated page on notion <img width="1125" alt="image" src="https://github.com/langgenius/dify/assets/22976415/bed60eea-d599-4cd9-9cee-0c179647effd"> <img width="1350" alt="image" src="https://github.com/langgenius/dify/assets/22976415/8c6ec4fd-63cb-4812-8ae0-71e2bd9b9a1a"> ### ✔️ Expected Behavior dify integrates the notion page and displays notion files normally ### ❌ Actual Behavior <img width="1162" alt="image" src="https://github.com/langgenius/dify/assets/22976415/9e5d8062-cf91-434a-859d-772149e6c50e"> <img width="799" alt="image" src="https://github.com/langgenius/dify/assets/22976415/eed66932-4149-404f-b255-78a3f988ece6">
yindo closed this issue 2026-02-21 18:06:15 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 3, 2024):

Hello, @jiegod! I'm here to assist you with any bugs, questions, or contributions you might have for the Dify repository. Let me know how I can help while we wait for a human maintainer to address your issue.

To resolve the issue of Dify showing 0 authorized pages for your Notion integration despite completing the authorization, follow these steps:

  1. Verify Authorization: Ensure that you have completed the authorization verification correctly. You can do this by:

    • Going to Settings -- Data Sources -- Add Data Source, clicking on the Notion source Bind, and completing the authorization verification.
    • Alternatively, when creating a dataset and selecting the data source, click Sync from Notion Content -- Bind Now and follow the prompts to complete the authorization.
  2. Check Integration Configuration: Make sure that your Notion integration is configured correctly. There are two ways to configure Notion integration in Dify:

    • Internal Integration: Create an integration in the Notion integration settings page and configure the relevant environment variables in the .env file.
    • Public Integration: Upgrade the internal integration to a public integration, fill in the required information, and configure the relevant environment variables in the .env file.
  3. Import Notion Data: After completing the authorization verification, go to the create dataset page, click Sync from Notion Content, and select the authorized pages you need to import.

  4. Segmentation and Cleaning: Choose your segmentation settings and indexing method, then Save and Process. Wait for Dify to process this data for you.

  5. Synchronize Notion Data: If your Notion content is modified, you can directly click Sync in the Dify dataset Document List Page to perform a one-click data synchronization.

  6. Select Pages During Authorization: When you are redirected to the Notion login page during the authorization process, ensure that you check the permissions needed by Dify and click the "Select pages" button. Select the pages you want to synchronize with Dify and press the "Allow access" button.

Ensure that the access token used is valid and has the necessary permissions to access the pages and databases in your Notion workspace. If the notion_page_search and notion_database_search methods are not returning any results, the pages list will be empty, leading to 0 authorized pages being shown [1][2][3].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jul 3, 2024): <!-- Greeting --> Hello, @jiegod! I'm here to assist you with any bugs, questions, or contributions you might have for the Dify repository. Let me know how I can help while we wait for a human maintainer to address your issue. <!-- Answer --> To resolve the issue of Dify showing 0 authorized pages for your Notion integration despite completing the authorization, follow these steps: 1. **Verify Authorization**: Ensure that you have completed the authorization verification correctly. You can do this by: - Going to **Settings -- Data Sources -- Add Data Source**, clicking on the Notion source **Bind**, and completing the authorization verification. - Alternatively, when creating a dataset and selecting the data source, click **Sync from Notion Content -- Bind Now** and follow the prompts to complete the authorization. 2. **Check Integration Configuration**: Make sure that your Notion integration is configured correctly. There are two ways to configure Notion integration in Dify: - **Internal Integration**: Create an integration in the Notion integration settings page and configure the relevant environment variables in the **.env** file. - **Public Integration**: Upgrade the internal integration to a public integration, fill in the required information, and configure the relevant environment variables in the **.env** file. 3. **Import Notion Data**: After completing the authorization verification, go to the create dataset page, click **Sync from Notion Content**, and select the authorized pages you need to import. 4. **Segmentation and Cleaning**: Choose your segmentation settings and indexing method, then **Save and Process**. Wait for Dify to process this data for you. 5. **Synchronize Notion Data**: If your Notion content is modified, you can directly click **Sync** in the Dify dataset **Document List Page** to perform a one-click data synchronization. 6. **Select Pages During Authorization**: When you are redirected to the Notion login page during the authorization process, ensure that you check the permissions needed by Dify and click the "Select pages" button. Select the pages you want to synchronize with Dify and press the "Allow access" button. Ensure that the access token used is valid and has the necessary permissions to access the pages and databases in your Notion workspace. If the `notion_page_search` and `notion_database_search` methods are not returning any results, the `pages` list will be empty, leading to 0 authorized pages being shown <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/libs/oauth_data_source.py)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/sync-from-notion.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/learn-more/use-cases/build-an-notion-ai-assistant.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@JohnJyong commented on GitHub (Jul 3, 2024):

have you clicked the sync button ?@jiegod

@JohnJyong commented on GitHub (Jul 3, 2024): have you clicked the `sync` button ?@jiegod
Author
Owner

@jiegod commented on GitHub (Jul 5, 2024):

have you clicked the sync button ?@jiegod

yes i click. But the effect is still no authorization page

@jiegod commented on GitHub (Jul 5, 2024): > have you clicked the `sync` button ?@jiegod yes i click. But the effect is still no authorization page
Author
Owner

@yst-one commented on GitHub (Jul 15, 2024):

你解决好了吗?我也是这个情况

@yst-one commented on GitHub (Jul 15, 2024): 你解决好了吗?我也是这个情况
Author
Owner

@Tendo33 commented on GitHub (Jul 30, 2024):

Same issue here.

@Tendo33 commented on GitHub (Jul 30, 2024): Same issue here.
Author
Owner

@JohnJyong commented on GitHub (Aug 7, 2024):

pls follow below setting:

# Notion import configuration, support public and internal
NOTION_INTEGRATION_TYPE=internal
NOTION_INTERNAL_SECRET=secret_***********

@jiegod @Tendo33 @yst-one

@JohnJyong commented on GitHub (Aug 7, 2024): pls follow below setting: ``` # Notion import configuration, support public and internal NOTION_INTEGRATION_TYPE=internal NOTION_INTERNAL_SECRET=secret_*********** ``` @jiegod @Tendo33 @yst-one
Author
Owner

@Tendo33 commented on GitHub (Aug 7, 2024):

pls follow below setting:

# Notion import configuration, support public and internal
NOTION_INTEGRATION_TYPE=internal
NOTION_INTERNAL_SECRET=secret_***********

@jiegod @Tendo33 @yst-one

That's exactly what I did.

@Tendo33 commented on GitHub (Aug 7, 2024): > pls follow below setting: > > ``` > # Notion import configuration, support public and internal > NOTION_INTEGRATION_TYPE=internal > NOTION_INTERNAL_SECRET=secret_*********** > ``` > > @jiegod @Tendo33 @yst-one That's exactly what I did.
Author
Owner

@lucaseatp commented on GitHub (Aug 9, 2024):

same issue

@lucaseatp commented on GitHub (Aug 9, 2024): same issue
Author
Owner

@chriswhite5918 commented on GitHub (Aug 25, 2024):

Same

@chriswhite5918 commented on GitHub (Aug 25, 2024): Same
Author
Owner

@thuanha-groove commented on GitHub (Sep 15, 2024):

After working through the issue, we need to manually share each page with the integration and click "Sync" again. It's Integration permissions section of this official document - https://developers.notion.com/docs/authorization#integration-permissions

Before an integration can interact with your Notion workspace page(s), the page must be manually shared with the integration. To share a page with an integration, visit the page in your Notion workspace, click the ••• menu at the top right of a page, scroll down to Add connections, and use the search bar to find and select the integration from the dropdown list.

@Tendo33 , @lucaseatp , @chriswhite5918

@thuanha-groove commented on GitHub (Sep 15, 2024): After working through the issue, we need to manually share each page with the integration and click "Sync" again. It's Integration permissions section of this official document - https://developers.notion.com/docs/authorization#integration-permissions > Before an integration can interact with your Notion workspace page(s), the page must be manually shared with the integration. To share a page with an integration, visit the page in your Notion workspace, click the ••• menu at the top right of a page, scroll down to Add connections, and use the search bar to find and select the integration from the dropdown list. @Tendo33 , @lucaseatp , @chriswhite5918
Author
Owner

@JirehC commented on GitHub (Oct 11, 2024):

What about incomplete syncing?
For instance, a database full page has 100 sub pages but it only managed to find 12.

@JirehC commented on GitHub (Oct 11, 2024): What about incomplete syncing? For instance, a database full page has 100 sub pages but it only managed to find 12.
Author
Owner

@SteveMoribe commented on GitHub (Nov 22, 2024):

I will include a case that I resolved as well.
I experienced the same issue, and upon carefully re-checking the NOTION_INTERNAL_SECRET, I found a typo. Even though there was a typo, Dify and Notion displayed a successful connection, which delayed the resolution of the problem. In reality, the SECRET was incorrect, so the connection was not actually successful. Please double-check for any typos.

@SteveMoribe commented on GitHub (Nov 22, 2024): I will include a case that I resolved as well. I experienced the same issue, and upon carefully re-checking the NOTION_INTERNAL_SECRET, I found a typo. Even though there was a typo, Dify and Notion displayed a successful connection, which delayed the resolution of the problem. In reality, the SECRET was incorrect, so the connection was not actually successful. Please double-check for any typos.
Author
Owner

@JirehC commented on GitHub (Nov 23, 2024):

I will include a case that I resolved as well. I experienced the same issue, and upon carefully re-checking the NOTION_INTERNAL_SECRET, I found a typo. Even though there was a typo, Dify and Notion displayed a successful connection, which delayed the resolution of the problem. In reality, the SECRET was incorrect, so the connection was not actually successful. Please double-check for any typos.

Thanks for the input, but ours are different. Ours are incomplete sync. I have like 100 subpages in a each database page, but only 10 are shown.

@JirehC commented on GitHub (Nov 23, 2024): > I will include a case that I resolved as well. I experienced the same issue, and upon carefully re-checking the NOTION_INTERNAL_SECRET, I found a typo. Even though there was a typo, Dify and Notion displayed a successful connection, which delayed the resolution of the problem. In reality, the SECRET was incorrect, so the connection was not actually successful. Please double-check for any typos. Thanks for the input, but ours are different. Ours are incomplete sync. I have like 100 subpages in a each database page, but only 10 are shown.
Author
Owner

@duylddev commented on GitHub (Feb 25, 2025):

same issue
always show 0 page permission

Image

@duylddev commented on GitHub (Feb 25, 2025): same issue always show 0 page permission ![Image](https://github.com/user-attachments/assets/627ba402-1989-47c8-9b94-5026e91d5bea)
Author
Owner

@limuyuan commented on GitHub (Apr 6, 2025):

After working through the issue, we need to manually share each page with the integration and click "Sync" again. It's Integration permissions section of this official document - https://developers.notion.com/docs/authorization#integration-permissions

Before an integration can interact with your Notion workspace page(s), the page must be manually shared with the integration. To share a page with an integration, visit the page in your Notion workspace, click the ••• menu at the top right of a page, scroll down to Add connections, and use the search bar to find and select the integration from the dropdown list.

@Tendo33 , @lucaseatp , @chriswhite5918

Thank you! You solved my issue. I didn't expect such operations to be done in Notion... Big thumbs up 👍

@limuyuan commented on GitHub (Apr 6, 2025): > After working through the issue, we need to manually share each page with the integration and click "Sync" again. It's Integration permissions section of this official document - https://developers.notion.com/docs/authorization#integration-permissions > > > Before an integration can interact with your Notion workspace page(s), the page must be manually shared with the integration. To share a page with an integration, visit the page in your Notion workspace, click the ••• menu at the top right of a page, scroll down to Add connections, and use the search bar to find and select the integration from the dropdown list. > > [@Tendo33](https://github.com/Tendo33) , [@lucaseatp](https://github.com/lucaseatp) , [@chriswhite5918](https://github.com/chriswhite5918) Thank you! You solved my issue. I didn't expect such operations to be done in Notion... Big thumbs up 👍
Author
Owner

@limuyuan commented on GitHub (Apr 6, 2025):

same issue always show 0 page permission

Image

Did you try the solution provided by thuanha-groove?

@limuyuan commented on GitHub (Apr 6, 2025): > same issue always show 0 page permission > > ![Image](https://github.com/user-attachments/assets/627ba402-1989-47c8-9b94-5026e91d5bea) Did you try the solution provided by [thuanha-groove](https://github.com/thuanha-groove)?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4404