Integração do Notion para chatbots e agentes de IA
Sobre esta integração
O Notion é uma das nossas integrações mais populares para chatbots de IA.
Conectar um chatbot ao Notion permite criar, atualizar e buscar páginas ou bancos de dados diretamente nas conversas, transformando o Notion em uma base de conhecimento dinâmica e também em um sistema de armazenamento de dados para fluxos de trabalho do chatbot.
Com a integração, os chatbots podem buscar informações no Notion para responder perguntas dos usuários, armazenar dados de clientes coletados durante os chats e registrar automaticamente atas de reuniões, tarefas ou feedbacks. Isso facilita a conexão da IA conversacional com a documentação da equipe, gestão de projetos ou registros de clientes.
A integração com o Notion é especialmente útil para empresas que já utilizam o Notion como espaço de trabalho central. Em vez de copiar e colar informações dos chats, o chatbot atualiza o Notion em tempo real.
Isso significa que as equipes sempre têm os dados mais recentes de clientes, chamados de suporte ou atualizações de tarefas diretamente no espaço de trabalho do Notion.
Ao conectar o Notion a um chatbot, é possível reduzir o trabalho manual de digitação, manter as informações corretas e usar o Notion tanto como entrada quanto saída para automações do chatbot.
Principais recursos
- Crie e atualize páginas do Notion a partir de conversas com o chatbot
- Armazene dados de clientes em bancos de dados do Notion
- Busque conteúdos do Notion para alimentar respostas do chatbot
- Registre tarefas, anotações e feedback automaticamente
- Sincronize entradas do chatbot com quadros de gestão de projetos
- Organize informações de suporte dentro do Notion
- Dispare atualizações no Notion a partir de fluxos do chatbot
- Mantenha os espaços de trabalho da equipe atualizados em tempo real
Como conecto um chatbot ao Notion?
Para conectar um chatbot ao Notion, basta autenticar sua conta do Notion nas configurações de integração da plataforma do chatbot. Assim, o chatbot poderá ler e escrever em páginas e bancos de dados do Notion.
Como posso criar ou atualizar uma página do Notion a partir de uma conversa com o chatbot?
Você configura o chatbot para enviar dados da conversa ao Notion usando a integração. Quando um gatilho ocorre—como um usuário enviando um feedback—o chatbot cria uma nova página ou atualiza uma existente com esse conteúdo.
Como posso usar o Notion como base de conhecimento para respostas do chatbot?
Você pode conectar o chatbot a um banco de dados do Notion que armazene perguntas frequentes, políticas ou documentação. O chatbot pode então consultar esse banco de dados e retornar o conteúdo relevante como resposta durante a conversa.
Como faço para pesquisar conteúdo do Notion através de um chatbot?
Você ativa a busca conectando o chatbot aos bancos de dados do Notion pela integração. Quando um usuário faz uma pergunta, o chatbot procura palavras-chave ou entidades no Notion e entrega as informações correspondentes.
Como posso armazenar diferentes tipos de dados das conversas no Notion?
É possível armazenar entradas de texto como nomes, e-mails, feedback e anotações, além de dados estruturados como caixas de seleção, tags ou campos de status. A integração faz o mapeamento das variáveis do chatbot para os campos do banco de dados do Notion.
Como manter os workspaces do Notion atualizados automaticamente com as informações inseridas pelo chatbot?
Você pode criar fluxos de trabalho onde eventos do chatbot disparam atualizações no Notion. Por exemplo, quando um cliente faz uma solicitação no chat, o chatbot cria ou atualiza automaticamente o registro correspondente no Notion, mantendo o espaço de trabalho sempre atualizado sem esforço manual.
The Notion Integration for Botpress Studio allows you to do the following things:
## Migrating from version `0.x` or `1.x` to `2.x`
Version `2.0` of the Notion integration adds OAuth support, which is now the default configuration option.
If you previously created a Notion integration in the Notion developer portal and wish to keep using this integration, please select the manual configuration option and follow the instructions below.
Otherwise, select the automatic configuration option and click the authorization button, then follow the on-screen instructions to connect your Botpress chatbot to Notion.
## Configuration
### Automatic configuration with OAuth (recommended)
This is the simplest way to set up the integration. To set up the Notion integration using OAuth, click the authorization button and follow the on-screen instructions to connect your Botpress chatbot to Notion. This method is recommended as it simplifies the configuration process and ensures secure communication between your chatbot and Notion.
When using this configuration mode, a Botpress-managed Notion application will be used to connect to your Notion account. Actions taken by the bot will be attributed to this application, not your personal Notion account.
### Manual configuration with a custom Notion integration
#### Step 1 - Create Integration
Create a Notion integration [Create an integration - Notion Developers](https://developers.notion.com/docs/create-a-notion-integration)
#### Step 2 - Give access to Notion Assets
Give your integration access to all the pages and databases that you want to use with Botpress
#### Step 3 - Configure your Bot
Give your integration access to all the pages and databases that you want to use with Botpress. [Share a database with your integration - Notion Developers](https://developers.notion.com/docs/create-a-notion-integration#step-2-share-a-database-with-your-integration)
You need a token to get your newly created Notion Integration _(not the same as Botpress Studio's Notion Integration)_ connected with Botpress Studio:
- `Auth Token` - You'll find this by going to your integration under `https://www.notion.so/my-integrations`. Once you click on your integration, go to the "Secrets" section and find the "Internal Integration Secret" field. Click "Show" then "Copy". Paste the copied token under `Auth Token` field for Notion integration under the "Integrations" tab for your bot.
With that you just need to enable your integration and you can start expanding your Bot's capabilities with Notion.
## Usage
The following actions require you to know the Ids of the Notion entities your bot will work with. All notion entities (pages, databases, etc) have and id that can be found in the URL when you visit those in your Notion account in a Browser,or by getting the link by clicking on the "Copy Link" item in the (...) menu. See [Get a Database Id - Notion Developers](https://developers.notion.com/docs/create-a-notion-integration#step-3-save-the-database-id) for more information
### Add Comment to a Discussion
This action allows you to add a comment to an existing discussion. Use this for replying to a comment.
### Add Comment to a Page
You can add page level comments with this action.
### Get a Database
This allows you to get the details of a Database. This is ideally used with the `Add Page to a Database` action. In addition to the response from the Notion API ([Retreive a Database - Notion Developers](https://developers.notion.com/reference/retrieve-a-database)), this action also returns a optimized `structure` property (technically a type decleration) that can be used as an input for an AI task to instruct it to generate a payload for adding or updating a page in a Notion Database based on a user input.
### Add Page to a Database
This action should ideally be used in tandem with `Get a Database` that returns the structure of the Database that you can use to instruct an [AI task](https://botpress.com/docs/cloud/generative-ai/ai-task-card/) to generate a payload. See [Working with Databases - Notion Developers](https://developers.notion.com/docs/working-with-databases) for more info.
### Delete a block
You can delete the following entities:
- a page in a database
- a page
- a block