docs/versioned_docs/version-1.8.0/Components/bundles-notion.mdx
import Icon from "@site/src/components/icon";
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, and then provide two examples of flows with Notion components.
To create a Notion app, you need the following:
After creating the integration, you need to configure its capabilities to define what actions it can perform and what data it can access.
:::warning 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.
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.
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:
Each of these components can output Data and Tool data types.
The Notion Agent for Meeting Notes is an AI-powered tool that automatically processes meeting transcripts and updates your Notion workspace. It identifies tasks, action items, and key points from your meetings, then creates new tasks or updates existing ones in Notion without manual input.
To build this flow, you need the following:
:::warning Treat all keys and other credentials as sensitive information. Use secure references, and don't share them publicly. :::
Create a flow manually or import a pre-built flow JSON file:
Input the Notion and OpenAI API keys in their respective components.
Paste your meeting transcript into the Meeting Transcript component.
For optimal results, use detailed meeting transcripts. The quality of the output depends on the comprehensiveness of the input provided.
Run the flow by clicking <Icon name="Play" aria-hidden="true" /> Run component on the Chat Output component or open the Playground.
Review the output summarizing the actions taken in your Notion workspace.
Optional: The flow can be customized to meet your team's specific needs. Customize this flow by:
The Notion Conversational Agent is an AI-powered assistant that interacts with your Notion workspace through natural language conversations. This flow performs Notion-related tasks like creating pages, searching for information, and managing content, all through a chat interface.
To build this flow, you need the following:
Open Langflow and create a new flow.
Add the components listed above to your flow canvas, or Download the Conversation Agent Flow(Download link) and Import the JSON file into Langflow.
Connect the components as shown in the flow diagram.
Input the Notion and OpenAI API keys in their respective components.
To start the flow, click the "Play" button in Langflow.
In the chat interface, enter a Notion-related request or question. For example:
The agent will process your request, use the appropriate Notion tools, and provide a response.
Continue the conversation, asking follow-up questions or giving new commands as needed.
<details> <summary>Example Conversation</summary>User: List all the users in my Notion workspace.
Agent: Certainly! I'll use the Notion User List tool to retrieve that information for you. One moment please.
[Agent uses the Notion User List tool]
Here's a list of users in your Notion workspace:
1. John Doe ([email protected])
2. Jane Smith ([email protected])
3. Alex Johnson ([email protected])
Is there anything specific you'd like to know about these users or any other Notion-related task I can help you with?
User: Create a new page in my Projects database with the title "Website Redesign".
Agent: Certainly! I'd be happy to create a new page in your Projects database with the title "Website Redesign". I'll use the Notion Page Creator tool to do this. First, let me check the properties of your Projects database to ensure we include all necessary information.
[Agent uses the Notion Database Properties tool]
I've retrieved the properties for your Projects database. Now, I'll create the new page with the title "Website Redesign". One moment please.
[Agent uses the Notion Page Creator tool]
Great news! I've successfully created a new page in your Projects database with the title "Website Redesign". Here are the details:
- Title: Website Redesign
- Page ID: [page_id_here]
- URL: [page_url_here]
Is there any additional information you'd like me to add to this new project page, such as a description, due date, or assigned team members?
User: Yes, please add a description: "Redesign company website to improve user experience and modernize the look."
Agent: Certainly! I'd be happy to add that description to the "Website Redesign" project page. I'll use the Add Content to Page tool to update the page with this information.
[Agent uses the Add Content to Page tool]
I've successfully added the description to your "Website Redesign" project page. Here's a summary of what I've done:
1. Located the "Website Redesign" page using the page ID from our previous interaction.
2. Added the following content to the page:
Description: Redesign company website to improve user experience and modernize the look.
The description has been added as a new text block on the page. Is there anything else you'd like me to add or modify on this project page?
Optional: The flow can be customized to meet your team's specific needs. For example:
If you encounter issues:
For more advanced usage and integration options, refer to the Notion API documentation and Langflow documentation.