langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
51.79k stars 7.51k forks source link

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

Closed jiegod closed 2 months ago

jiegod commented 4 months ago

Self Checks

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
dosubot[bot] commented 4 months ago

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.

JohnJyong commented 4 months ago

have you clicked the sync button ?@jiegod

jiegod commented 4 months ago

have you clicked the sync button ?@jiegod

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

yst-one commented 4 months ago

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

Tendo33 commented 3 months ago

Same issue here.

JohnJyong commented 3 months ago

pls follow below setting:

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

@jiegod @Tendo33 @yst-one

Tendo33 commented 3 months ago

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.

lucaseatp commented 3 months ago

same issue

chriswhite5918 commented 2 months ago

Same

thuanha-groove commented 2 months ago

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

JirehC commented 1 month ago

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