Last updated
Last updated
The Dify knowledge base supports importing data from Notion with subsequent automatic synchronization.
When creating a dataset and selecting the data source, click Sync from Notion Content -- Bind Now and follow the prompts to complete the authorization verification.
Alternatively, you can go to Settings -- Data Sources -- Add Data Source, click on the Notion source Bind, and complete the authorization verification.
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.
Note: images and files cannot be imported, and data from tables will be converted to text.
If your Notion content has been updated, you can sync the changes by clicking the Sync button for the corresponding page in the document list of your knowledge base. Syncing involves an embedding process, which will consume tokens from your embedding model.
Specific steps:
Click the New integration button. The type is Internal by default (cannot be modified). Select the associated space, enter the integration name, upload a logo, and click Submit to create the integration successfully.
After creating the integration, you can update its settings as needed under the Capabilities tab and click the Show button under Secrets to copy the secrets.
After copying, go back to the Dify source code, and configure the relevant environment variables in the .env file. The environment variables are as follows:
You need to upgrade the internal integration to a public integration. Navigate to the Distribution page of the integration, and toggle the switch to make the integration public. When switching to the public setting, you need to fill in additional information in the Organization Information form below, including your company name, website, and redirect URL, then click the Submit button.
After successfully making the integration public on the integration settings page, you will be able to access the integration key in the Keys tab:
Go back to the Dify source code, and configure the relevant environment variables in the .env file. The environment variables are as follows:
After configuration, you can operate the Notion data import and synchronization functions in the dataset.
Next, choose a and for your knowledge base, then save it and wait for the automatically processing. Dify not only supports importing standard Notion pages but can also consolidate and save page attributes from database-type pages.
Notion offers two integration options: internal integration and public integration. For more details on the differences between these two methods, please refer to the .
First, create an integration in the integration settings page . By default, all integrations start as internal integrations; internal integrations will be associated with the workspace you choose, so you need to be the workspace owner to create an integration.