An error is reported when binding Notion #8471

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

Originally created by @liuzhikun-mubai on GitHub (Feb 20, 2025).

Discussed in https://github.com/langgenius/dify/discussions/14120

Originally posted by liuzhikun-mubai February 20, 2025

Self Checks

  • 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.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

When the point is bound to Notion, it will be reported directly:
{"error":"invalid_request","error_description":"query failed validation: query.client_id should be a string or undefined, instead was 0.","request_id":"2c28e2ce-f8b8-422f-ad59-c831d45194cd"}

2. Additional context or comments

No response

Originally created by @liuzhikun-mubai on GitHub (Feb 20, 2025). ### Discussed in https://github.com/langgenius/dify/discussions/14120 <div type='discussions-op-text'> <sup>Originally posted by **liuzhikun-mubai** February 20, 2025</sup> ### Self Checks - [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. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. When the point is bound to Notion, it will be reported directly: {"error":"invalid_request","error_description":"query failed validation: query.client_id should be a string or `undefined`, instead was `0`.","request_id":"2c28e2ce-f8b8-422f-ad59-c831d45194cd"} ### 2. Additional context or comments _No response_</div>
yindo added the 🐞 bug label 2026-02-21 18:25:51 -05:00
yindo closed this issue 2026-02-21 18:25:51 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 20, 2025):

Hey there, @liuzhikun-mubai! 👋 I'm here to help you out with any bugs, questions, or even becoming a contributor. I'm an expert bot, and I'll assist you while we wait for a human maintainer.

I found two similar unsolved discussions that might be relevant to your issue:

  1. Error when adding Notion data source in the community version of Dify [1].
  2. Help!when i connected to notion in my local dify ,it always had a "invalid_request " error [2].

Regarding the error message you're encountering, it seems that the client_id is expected to be a string or undefined, but it is currently set to 0. Ensure that the client_id is correctly configured in your environment variables. You can obtain the client_id by creating a Notion integration at Notion Integrations. Make sure to set the NOTION_CLIENT_ID in your .env file correctly [3].

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Feb 20, 2025): <!-- Greeting --> Hey there, @liuzhikun-mubai! 👋 I'm here to help you out with any bugs, questions, or even becoming a contributor. I'm an expert bot, and I'll assist you while we wait for a human maintainer. <!-- Answer --> I found two similar unsolved discussions that might be relevant to your issue: 1. [Error when adding Notion data source in the community version of Dify](https://github.com/langgenius/dify/discussions/7478) <sup>[[1]](https://github.com/langgenius/dify/discussions/7478)</sup>. 2. [Help!when i connected to notion in my local dify ,it always had a "invalid_request " error](https://github.com/langgenius/dify/discussions/9395) <sup>[[2]](https://github.com/langgenius/dify/discussions/9395)</sup>. Regarding the error message you're encountering, it seems that the `client_id` is expected to be a string or `undefined`, but it is currently set to `0`. Ensure that the `client_id` is correctly configured in your environment variables. You can obtain the `client_id` by creating a Notion integration at [Notion Integrations](https://www.notion.so/my-integrations). Make sure to set the `NOTION_CLIENT_ID` in your `.env` file correctly <sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/getting-started/install-self-hosted/environments.md)</sup>. <!-- 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/806060eb-05c4-411f-86d7-534b4c04ab05?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/806060eb-05c4-411f-86d7-534b4c04ab05?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/806060eb-05c4-411f-86d7-534b4c04ab05?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/806060eb-05c4-411f-86d7-534b4c04ab05?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/806060eb-05c4-411f-86d7-534b4c04ab05?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/806060eb-05c4-411f-86d7-534b4c04ab05?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/806060eb-05c4-411f-86d7-534b4c04ab05?feedback_type=other)</sup>
Author
Owner

@felipematos commented on GitHub (Mar 13, 2025):

I believe you have to edit your .env file to add integration keys to Notion, as explained here? https://docs.dify.ai/guides/knowledge-base/create-knowledge-and-upload-documents/1.-import-text-data/1.1-import-data-from-notion

@felipematos commented on GitHub (Mar 13, 2025): I believe you have to edit your .env file to add integration keys to Notion, as explained here? https://docs.dify.ai/guides/knowledge-base/create-knowledge-and-upload-documents/1.-import-text-data/1.1-import-data-from-notion
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8471