Closed 360troubleWind closed 2 months ago
@360troubleWind Hello there! I'm here to help you with any bugs, questions, or contributions you might have. Let's work together to solve the issue you're encountering.
To resolve the issue of not being able to obtain page information in Notion when using Dify version 0.6.12-fix1, self-hosted via Docker, you need to ensure that the Notion integration configuration is correctly set up. Specifically, you should check the following environment variables:
NOTION_INTEGRATION_TYPE
is set to "internal".NOTION_INTEGRATION_TYPE
is set to "public".Here is an example configuration for internal integration:
NOTION_INTEGRATION_TYPE=internal
NOTION_INTERNAL_SECRET=your_notion_internal_integration_secret
CONSOLE_API_URL=https://your-api-url
CONSOLE_WEB_URL=https://your-web-url
And for public integration:
NOTION_INTEGRATION_TYPE=public
NOTION_CLIENT_ID=your_client_id
NOTION_CLIENT_SECRET=your_client_secret
CONSOLE_API_URL=https://your-api-url
CONSOLE_WEB_URL=https://your-web-url
Make sure these variables are correctly set in your environment configuration file or Docker environment variables. This should resolve the issues with internal Notion pages not responding and the "Missing or invalid redirect_uri" error for public Notion pages.
Additionally, ensure that the redirect_uri
parameter in your OAuth configuration matches the URL set in your Notion integration settings. The redirect_uri
should be correctly formatted and should be the same as the one registered in your Notion OAuth application [1][2][3].
For more detailed steps on setting up the integration, you can refer to the Dify documentation on importing data from Notion [4].
Here is an example snippet from the docker-compose.yaml
file that includes the relevant environment variables:
SENTRY_PROFILES_SAMPLE_RATE: 1.0
# Notion import configuration, support public and internal
NOTION_INTEGRATION_TYPE: public
NOTION_CLIENT_SECRET: your-client-secret
NOTION_CLIENT_ID: your-client-id
NOTION_INTERNAL_SECRET: your-internal-secret
# The sandbox service endpoint.
CODE_EXECUTION_ENDPOINT: "http://sandbox:8194"
CODE_EXECUTION_API_KEY: dify-sandbox
CODE_MAX_NUMBER: 9223372036854775807
CODE_MIN_NUMBER: -9223372036854775808
CODE_MAX_STRING_LENGTH: 80000
TEMPLATE_TRANSFORM_MAX_LENGTH: 80000
CODE_MAX_STRING_ARRAY_LENGTH: 30
CODE_MAX_OBJECT_ARRAY_LENGTH: 30
CODE_MAX_NUMBER_ARRAY_LENGTH: 1000
# SSRF Proxy server
SSRF_PROXY_HTTP_URL: 'http://ssrf_proxy:3128'
SSRF_PROXY_HTTPS_URL: 'http://ssrf_proxy:3128'
# Indexing configuration
INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: 1000
depends_on:
- db
- redis
volumes:
# Mount the storage directory to the container, for storing user files.
- ./volumes/app/storage:/app/api/storage
# uncomment to expose dify-api port to host
# ports:
# - "5001:5001"
networks:
- ssrf_proxy_network
- default
Ensure that these configurations are correctly set in your docker-compose.yaml
file to avoid any issues with Notion integration [5].
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.6.12-fix1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
When I deployed dify locally and configured the integration of notion, I could not obtain the contents of the notion:
If it is an internal notion, there will be no response when clicking configure.
If it is a public notion, an error will be reported when clicking on the configuration.
✔️ Expected Behavior
Solved the problem and successfully obtained the content of my notice
❌ Actual Behavior
No response