feat: notion-documentation (#3767)
* docs: add notion category and setup file * docs: Add Notion Agent Meeting Notes documentation * docs: Remove unused anchors in Notion guide * docs(Notion): Add guide for Conversational Notion Agent * feat: add notion example flows * cleanup * build and run * align-pages --------- Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
This commit is contained in:
parent
eb3bf824a3
commit
b570f9695d
9 changed files with 413 additions and 0 deletions
File diff suppressed because one or more lines are too long
1
docs/docs/Integrations/Notion/Meeting_Notes_Agent.json
Normal file
1
docs/docs/Integrations/Notion/Meeting_Notes_Agent.json
Normal file
File diff suppressed because one or more lines are too long
1
docs/docs/Integrations/Notion/_category_.json
Normal file
1
docs/docs/Integrations/Notion/_category_.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"position":2, "label":"Notion"}
|
||||
89
docs/docs/Integrations/Notion/integrations-notion.md
Normal file
89
docs/docs/Integrations/Notion/integrations-notion.md
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
---
|
||||
title: Setup
|
||||
sidebar_position: 0
|
||||
slug: /integrations/notion/setup
|
||||
---
|
||||
|
||||
# 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
|
||||
|
||||
1. Go to the [Notion Integrations](https://www.notion.com/my-integrations) page.
|
||||
2. Click on the "New integration" button.
|
||||
3. Give your integration a name and select the workspace where you want to use it.
|
||||
4. Click "Submit" to create the integration.
|
||||
|
||||
:::info
|
||||
When creating the integration, make sure to enable the necessary capabilities based on your requirements. Refer to the [Notion Integration Capabilities](https://developers.notion.com/reference/capabilities) documentation for more information on each capability.
|
||||
:::
|
||||
|
||||
|
||||
## 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.
|
||||
|
||||
1. In the integration settings page, go to the **Capabilities** tab.
|
||||
2. 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.
|
||||
3. Configure the user information access level based on your integration's requirements.
|
||||
4. Save the changes.
|
||||
|
||||
## Obtain Integration Token
|
||||
|
||||
To authenticate your integration with Notion, you need to obtain an integration token.
|
||||
|
||||
1. In the integration settings page, go to the "Secrets" tab.
|
||||
2. Copy the "Internal Integration Token" value. This token will be used to authenticate your integration with Notion.
|
||||
|
||||
:::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.
|
||||
:::
|
||||
|
||||
## 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 will be working with.
|
||||
|
||||
1. Open the Notion database that you want your integration to access.
|
||||
2. Click on the "Share" button in the top-right corner of the page.
|
||||
3. In the "Invite" section, select your integration from the list.
|
||||
4. Click "Invite" to grant the integration access to the database.
|
||||
|
||||
:::info
|
||||
If your database contains references to other databases, you need to grant the integration access to those referenced databases as well. Repeat step 4 for each referenced database to ensure your integration has the necessary 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.
|
||||
|
||||
Langflow provides the following Notion components:
|
||||
|
||||
- **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.
|
||||
- **List Users**: Retrieves a list of users from the Notion workspace.
|
||||
- **List Database Properties**: Retrieves the properties of a specified Notion database.
|
||||
- **Create Page**: Creates a new page in a specified Notion database with the provided properties.
|
||||
- **Update Page Property**: Updates the properties of an existing Notion page.
|
||||
- **Add Content to Page**: Converts markdown text to Notion blocks and appends them to a specified Notion page.
|
||||
- **List Pages**: Queries a Notion database with filtering and sorting options.
|
||||
- **Page Content Viewer**: Retrieves the content of a Notion page as plain text.
|
||||
|
||||
Each of these components output both "Data" and "Tool":
|
||||
- The "Data" output can be used directly in your Langflow for further processing or display.
|
||||
- The "Tool" output can be utilized in Langflow Agents, allowing them to interact with Notion programmatically.
|
||||
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [Notion API Documentation](https://developers.notion.com/docs/getting-started)
|
||||
- [Notion Integration Capabilities](https://developers.notion.com/reference/capabilities)
|
||||
|
||||
If you encounter any issues or have questions, please reach out to our support team or consult the Langflow community forums.
|
||||
145
docs/docs/Integrations/Notion/notion-agent-conversational.md
Normal file
145
docs/docs/Integrations/Notion/notion-agent-conversational.md
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
---
|
||||
title: Notion Conversational Agent
|
||||
sidebar_position: 2
|
||||
slug: /integrations/notion/notion-agent-conversational
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
---
|
||||
|
||||
- [Notion App](/integrations/notion/setup)
|
||||
- [Notion account and API key](https://www.notion.so/my-integrations)
|
||||
- [OpenAI API key](https://platform.openai.com/account/api-keys)
|
||||
- [Download Flow Conversation Agent Flow](./Conversational_Notion_Agent.json)(Download link)
|
||||
|
||||

|
||||
|
||||
## Flow Components
|
||||
|
||||
---
|
||||
|
||||
|
||||
### Input and Output
|
||||
- **Chat Input**: Accepts user queries and commands
|
||||
- **Chat Output**: Displays the agent's responses
|
||||
|
||||
### Language Model
|
||||
- **OpenAI Model**: Processes user input and generates responses
|
||||
|
||||
### Agent and Tools
|
||||
- **Tool Calling Agent**: Coordinates the use of various Notion tools based on user input
|
||||
- **Toolkit**: Combines multiple Notion-specific tools into a single toolkit
|
||||
- **Notion Tools**: Various components for interacting with Notion, including:
|
||||
- List Users
|
||||
- List Database Properties
|
||||
- List Pages
|
||||
- Page Content Viewer
|
||||
- Create Page
|
||||
- Update Page Property
|
||||
- Add Content to Page
|
||||
- Search
|
||||
|
||||
### Memory and Prompt
|
||||
- **Chat Memory**: Stores conversation history
|
||||
- **Prompt**: Provides system instructions and context for the agent
|
||||
- **Current Date**: Supplies the current date and time for context
|
||||
|
||||
|
||||
## Run the Conversational Notion Agent
|
||||
|
||||
---
|
||||
|
||||
1. Open Langflow and create a new project.
|
||||
2. Add the components listed above to your flow canvas, or Download the [Conversation Agent Flow](./Conversational_Notion_Agent.json)(Download link) and **Import** the JSON file into Langflow.
|
||||
3. Connect the components as shown in the flow diagram.
|
||||
4. Input the Notion and OpenAI API keys in their respective components.
|
||||
5. To start the flow, click the "Play" button in Langflow.
|
||||
6. In the chat interface, enter a Notion-related request or question. For example:
|
||||
- "Create a new page in my task database"
|
||||
- "Search for pages about project management"
|
||||
- "List all users in my Notion workspace"
|
||||
7. The agent will process your request, use the appropriate Notion tools, and provide a response.
|
||||
8. Continue the conversation, asking follow-up questions or giving new commands as needed.
|
||||
|
||||
## Example Interactions
|
||||
|
||||
---
|
||||
|
||||
```
|
||||
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 (john@example.com)
|
||||
2. Jane Smith (jane@example.com)
|
||||
3. Alex Johnson (alex@example.com)
|
||||
|
||||
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?
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Customization
|
||||
|
||||
---
|
||||
|
||||
The flow can be customized to meet your team's specific needs.
|
||||
|
||||
Customize this flow by:
|
||||
|
||||
1. Adjusting the system prompt to change the agent's behavior or knowledge base.
|
||||
2. Adding or removing Notion tools based on your specific needs.
|
||||
3. Modifying the OpenAI model parameters (e.g., temperature) to adjust the agent's response style.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
---
|
||||
|
||||
If you encounter issues:
|
||||
|
||||
1. Ensure all API keys are correctly set and have the necessary permissions.
|
||||
2. Check that your Notion integration has access to the relevant pages and databases.
|
||||
3. Verify that all components are properly connected in the flow.
|
||||
4. Review the Langflow logs for any error messages.
|
||||
|
||||
For more advanced usage and integration options, refer to the [Notion API documentation](https://developers.notion.com/) and [Langflow documentation](/).
|
||||
176
docs/docs/Integrations/Notion/notion-agent-meeting-notes.md
Normal file
176
docs/docs/Integrations/Notion/notion-agent-meeting-notes.md
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
---
|
||||
title: Notion Meeting Notes Agent
|
||||
sidebar_position: 1
|
||||
slug: /integrations/notion/notion-agent-meeting-notes
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
## Prerequisites
|
||||
---
|
||||
|
||||
- [Notion App](/integrations/notion/setup)
|
||||
- [Notion API key](https://www.notion.so/my-integrations)
|
||||
- [OpenAI API key](https://platform.openai.com/account/api-keys)
|
||||
- [Download Flow Meeting Agent Flow](./Meeting_Notes_Agent.json)(Download link)
|
||||
|
||||
:::warning
|
||||
|
||||
Before using this flow, ensure you have obtained the necessary API keys from Notion and OpenAI. These keys are essential for the flow to function properly. Keep them secure and do not share them publicly.
|
||||
|
||||
:::
|
||||
|
||||
## Components
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### Meeting Transcript (Text Input)
|
||||
|
||||
This component allows users to input the meeting transcript directly into the flow.
|
||||
|
||||
### List Users (Notion Component)
|
||||
|
||||
- **Purpose**: Retrieves a list of users from the Notion workspace.
|
||||
- **Input**: Notion Secret (API key)
|
||||
- **Output**: List of user data
|
||||
|
||||
### List Databases (Notion Component)
|
||||
|
||||
- **Purpose**: Searches and lists all databases in the Notion workspace.
|
||||
- **Input**:
|
||||
- Notion Secret (API key)
|
||||
- Query (optional)
|
||||
- Filter Type (default: database)
|
||||
- Sort Direction
|
||||
- **Output**: List of database data
|
||||
|
||||
### Prompt
|
||||
|
||||
This component creates a dynamic prompt template using the following inputs:
|
||||
- Meeting Transcript
|
||||
- List of Users
|
||||
- List of Databases
|
||||
- Current Date
|
||||
|
||||
### Meeting Summarizer (Tool Calling Agent)
|
||||
|
||||
- **Purpose**: Analyzes the meeting transcript and identifies tasks and action items.
|
||||
- **Inputs**:
|
||||
- System Prompt (from the Prompt component)
|
||||
- Language Model (OpenAI)
|
||||
- Tools:
|
||||
- Notion Search
|
||||
- List Database Properties
|
||||
- Create Page
|
||||
- Update Page Property
|
||||
- Add Content to Page
|
||||
|
||||

|
||||
|
||||
### Notion Agent (Tool Calling Agent)
|
||||
|
||||
- **Purpose**: Executes actions in Notion based on the meeting summary.
|
||||
- **Inputs**:
|
||||
- System Prompt (from the second Prompt component)
|
||||
- Language Model (OpenAI)
|
||||
- Tools:
|
||||
- List Database Properties
|
||||
- Create Page
|
||||
- Update Page Property
|
||||
- Add Content to Page
|
||||
|
||||
### Notion Components (Tools)
|
||||
|
||||
#### List Database Properties
|
||||
|
||||
- **Purpose**: Retrieves the properties of a specified Notion database.
|
||||
- **Input**:
|
||||
- Database ID
|
||||
- Notion Secret (API key)
|
||||
|
||||
#### Create Page
|
||||
|
||||
- **Purpose**: Creates a new page in a Notion database.
|
||||
- **Inputs**:
|
||||
- Database ID
|
||||
- Notion Secret (API key)
|
||||
- Properties (JSON)
|
||||
|
||||
#### Update Page Property
|
||||
|
||||
- **Purpose**: Updates the properties of an existing Notion page.
|
||||
- **Inputs**:
|
||||
- Page ID
|
||||
- Notion Secret (API key)
|
||||
- Properties to update
|
||||
|
||||
#### Add Content to Page
|
||||
|
||||
- **Purpose**: Converts markdown text to Notion blocks and appends them to a specified Notion page.
|
||||
- **Inputs**:
|
||||
- Page/Block ID
|
||||
- Notion Secret (API key)
|
||||
- Markdown text
|
||||
|
||||
### Chat Output
|
||||
|
||||
Displays the final output of the Notion Agent in the Playground.
|
||||
|
||||
## Flow Process
|
||||
|
||||
---
|
||||
|
||||
1. The user inputs a meeting transcript.
|
||||
2. The flow retrieves the list of Notion users and databases.
|
||||
3. A prompt is generated using the transcript, user list, database list, and current date.
|
||||
4. The Meeting Summarizer analyzes the transcript and identifies tasks and action items.
|
||||
5. The Notion Agent uses the meeting summary to:
|
||||
- Create new pages for new tasks
|
||||
- Update existing pages for existing tasks
|
||||
- Add content to pages with meeting notes
|
||||
6. The Chat Output displays a summary of actions taken in Notion.
|
||||
|
||||
## Run the Notion Meeting Notes flow
|
||||
|
||||
---
|
||||
|
||||
To run the Notion Agent for Meeting Notes:
|
||||
|
||||
1. Open Langflow and create a new project.
|
||||
2. Add the components listed above to your flow canvas, or download the [Flow Meeting Agent Flow](./Meeting_Notes_Agent.json)(Download link) and **Import** the JSON file into Langflow.
|
||||
3. Connect the components as shown in the flow diagram.
|
||||
4. Input the Notion and OpenAI API keys in their respective components.
|
||||
5. Paste your meeting transcript into the Meeting Transcript component.
|
||||
6. Run the flow by clicking **Play** on the **Chat Output** component.
|
||||
7. Review the output in the Chat Output component, which will summarize the actions taken in your Notion workspace.
|
||||
|
||||
For optimal results, use detailed meeting transcripts. The quality of the output depends on the comprehensiveness of the input provided.
|
||||
|
||||
## Customization
|
||||
|
||||
---
|
||||
|
||||
The flow can be customized to meet your team's specific needs.
|
||||
|
||||
Customize this flow by:
|
||||
|
||||
1. Adjusting the system prompt to change the agent's behavior or knowledge base.
|
||||
2. Adding or removing Notion tools based on your specific needs.
|
||||
3. Modifying the OpenAI model parameters (e.g., temperature) to adjust the agent's response style.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
---
|
||||
|
||||
If you encounter issues:
|
||||
|
||||
1. Ensure all API keys are correctly set and have the necessary permissions.
|
||||
2. Check that your Notion integration has access to the relevant pages and databases.
|
||||
3. Verify that all components are properly connected in the flow.
|
||||
4. Review the Langflow logs for any error messages.
|
||||
|
||||
For more advanced usage and integration options, refer to the [Notion API documentation](https://developers.notion.com/) and [Langflow documentation](/).
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 131 KiB |
BIN
docs/docs/Integrations/Notion/notion_meeting_agent_part_1.png
Normal file
BIN
docs/docs/Integrations/Notion/notion_meeting_agent_part_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 113 KiB |
BIN
docs/docs/Integrations/Notion/notion_meeting_agent_part_2.png
Normal file
BIN
docs/docs/Integrations/Notion/notion_meeting_agent_part_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 177 KiB |
Loading…
Add table
Add a link
Reference in a new issue