Blank Page with Error When Adding Notion Configuration in Data Sources #7391

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

Originally created by @yyyyysssssi7606 on GitHub (Dec 25, 2024).

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).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Hello,

When attempting to add a Notion configuration in the Data Sources section of the settings, I am redirected to a blank page. The page displays the following error message:

{
  "error": "invalid_request",
  "error_description": "query failed validation: query.client_id should be a string or `undefined`, instead was `0`.",
  "request_id": "4ce7caa0-10d3-4499-8618-39d8ddb8577e"
}

Could you please provide guidance on how to resolve this issue? Specifically, it seems that there is an issue with the client_id not being passed correctly as a string.

Thank you for your assistance.

Best regards,

✔️ Expected Behavior

My expectation is that after adding the Notion configuration, a popup window or another configuration interface should appear to guide me through the setup process.

Actual Behavior

I encounter this error and the process cannot be completed.

Originally created by @yyyyysssssi7606 on GitHub (Dec 25, 2024). ### 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] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.14.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Hello, When attempting to add a Notion configuration in the Data Sources section of the settings, I am redirected to a blank page. The page displays the following error message: ~~~Json { "error": "invalid_request", "error_description": "query failed validation: query.client_id should be a string or `undefined`, instead was `0`.", "request_id": "4ce7caa0-10d3-4499-8618-39d8ddb8577e" } ~~~ Could you please provide guidance on how to resolve this issue? Specifically, it seems that there is an issue with the client_id not being passed correctly as a string. Thank you for your assistance. Best regards, ### ✔️ Expected Behavior My expectation is that after adding the Notion configuration, a popup window or another configuration interface should appear to guide me through the setup process. ### ❌ Actual Behavior I encounter this error and the process cannot be completed.
yindo added the 🐞 bug label 2026-02-21 18:20:22 -05:00
yindo closed this issue 2026-02-21 18:20:22 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 25, 2024):

I found a similar unsolved discussion regarding an error when adding a Notion data source in the community version of Dify [1].

The error message you're encountering indicates that the client_id is being set as 0 instead of a string. In the Dify platform, the client_id should be a string or undefined, and it is typically set in the .env file under the environment variable NOTION_CLIENT_ID [2].

Ensure that your .env file has the correct configuration for the Notion integration:

NOTION_INTEGRATION_TYPE=public
NOTION_CLIENT_SECRET=your-client-secret
NOTION_CLIENT_ID=your-client-id

Make sure that your-client-id is a valid string and not set to 0. If the issue persists, double-check the environment variable settings and ensure that they are correctly loaded into your application.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Dec 25, 2024): <!-- Answer --> I found a similar unsolved discussion regarding an error when adding a Notion data source in the community version of Dify <sup>[[1]](https://github.com/langgenius/dify/discussions/7478)</sup>. The error message you're encountering indicates that the `client_id` is being set as `0` instead of a string. In the Dify platform, the `client_id` should be a string or `undefined`, and it is typically set in the `.env` file under the environment variable `NOTION_CLIENT_ID` <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/knowledge-base/sync-from-notion.md)</sup>. Ensure that your `.env` file has the correct configuration for the Notion integration: ```plaintext NOTION_INTEGRATION_TYPE=public NOTION_CLIENT_SECRET=your-client-secret NOTION_CLIENT_ID=your-client-id ``` Make sure that `your-client-id` is a valid string and not set to `0`. If the issue persists, double-check the environment variable settings and ensure that they are correctly loaded into your application. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/2ea608ef-0a46-427e-9784-e1c2995d3c14?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/2ea608ef-0a46-427e-9784-e1c2995d3c14?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/2ea608ef-0a46-427e-9784-e1c2995d3c14?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/2ea608ef-0a46-427e-9784-e1c2995d3c14?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2ea608ef-0a46-427e-9784-e1c2995d3c14?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/2ea608ef-0a46-427e-9784-e1c2995d3c14?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Dec 25, 2024):

Check the settings of the notion.

@crazywoola commented on GitHub (Dec 25, 2024): Check the settings of the notion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7391