Set up a Notion App
To use Notion components in Langflow, you first need to create a Notion integration and configure it with the necessary capabilities. This guide will walk you through the process of setting up a Notion integration and granting it access to your Notion databases.
Prerequisites
- A Notion account with access to the workspace where you want to use the integration.
- Admin permissions in the Notion workspace to create and manage integrations.
Create a Notion Integration
- Go to the Notion Integrations page.
- Click New Integration.
- Enter an integration name, and then select the workspace where you want to use it.
- Optional: Enable the necessary Notion integration capabilities based on your requirements.
- Click Submit to create the integration.
Configure Integration Capabilities
After creating the integration, you need to configure its capabilities to define what actions it can perform and what data it can access.
- In the integration settings page, go to the Capabilities tab.
- Enable the required capabilities for your integration. For example:
- If your integration needs to read data from Notion, enable the "Read content" capability.
- If your integration needs to create new content in Notion, enable the "Insert content" capability.
- If your integration needs to update existing content in Notion, enable the "Update content" capability.
- Configure the user information access level based on your integration's requirements.
- Save the changes.
Obtain Integration Token
Your integration token is a sensitive piece of information. Make sure to keep it secure and never share it publicly. Store it safely in your Langflow configuration or environment variables.
To authenticate your integration with Notion, you need to obtain an integration token.
- In the integration settings page, go to the "Secrets" tab.
- Copy the "Internal Integration Token" value. This token will be used to authenticate your integration with Notion.
Grant Integration Access to Notion Databases
For your integration to interact with Notion databases, you need to grant it access to the specific databases it must work with:
-
Open the Notion database that you want your integration to access.
-
Click Share.
-
In the Invite section, select your integration from the list.
-
Click Invite to grant the integration access to the database.
If your database contains references to other databases, you need to grant the integration access to those referenced databases as well. Repeat this step for each referenced database that your integration must access.
Build with Notion components in Langflow
Once you have set up your Notion integration and granted it access to the required databases, you can start using the Notion components in Langflow:
- Add Content to Page: Converts markdown text to Notion blocks and appends them to a specified Notion page.
- Create Page: Creates a new page in a specified Notion database with the provided properties.
- List Database Properties: Retrieves the properties of a specified Notion database.
- List Pages: Queries a Notion database with filtering and sorting options.
- List Users: Retrieves a list of users from the Notion workspace.
- Page Content Viewer: Retrieves the content of a Notion page as plain text.
- Search: Searches all pages and databases that have been shared with the integration. You can filter results to either pages or databases and specify the sort direction.
- Update Page Property: Updates the properties of an existing Notion page.
Each of these components can output Data
and Tool
data types.