diff --git a/integrations/integration-guides/assets/notion-capabilities.png b/integrations/integration-guides/assets/notion-capabilities.png deleted file mode 100644 index ff4e72ba..00000000 Binary files a/integrations/integration-guides/assets/notion-capabilities.png and /dev/null differ diff --git a/integrations/integration-guides/assets/notion-secret.png b/integrations/integration-guides/assets/notion-secret.png deleted file mode 100644 index 85a0f89b..00000000 Binary files a/integrations/integration-guides/assets/notion-secret.png and /dev/null differ diff --git a/integrations/integration-guides/assets/notion.png b/integrations/integration-guides/assets/notion.png deleted file mode 100644 index 7f99a352..00000000 Binary files a/integrations/integration-guides/assets/notion.png and /dev/null differ diff --git a/integrations/integration-guides/notion.mdx b/integrations/integration-guides/notion.mdx index 945038b2..c1ea0894 100644 --- a/integrations/integration-guides/notion.mdx +++ b/integrations/integration-guides/notion.mdx @@ -1,5 +1,6 @@ --- title: Notion +description: Add a bot to Notion using the official integration. icon: '/integrations/integration-guides/assets/icons/notion.png' --- @@ -14,52 +15,166 @@ import Triggers from '/snippets/integrations/triggers/botpress/notion.mdx' - - - - The Notion Integration with Botpress enables seamless integration to boost productivity, allowing interactions such as commenting on discussions or pages and database manipulations right from your Botpress bot. -Enhance your Workflows and experience a streamlined interaction between Botpress and Notion. - -## Prerequisites - -* A [Notion Account](https://www.notion.so/signup) and a [Notion Workspace](https://www.notion.so/onboarding) -* A [Botpress Cloud account](https://sso.botpress.cloud) and a [Botpress Bot](/get-started/quick-start) - -## Setup in Botpress - -1. Go to the [Integration Hub](https://app.botpress.cloud/hub) in Botpress Cloud (if you don't have the integration installed yet). -2. Find and open the Notion integration then click on the "Install to Bot" button, now go back to your bot settings. - -The Notion integration has the following settings: - -* **Enabled**: Whether Botpress will communicate with Telegram -* **Webhook URL**: The URL for receiving data in Botpress -* **Auth Token**: The token for authenticating requests from Notion - -## Setup up Notion - -1. To get the **Auth Token**, visit [My Integrations](https://www.notion.so/my-integrations) in Notion. Initiate a new integration, associate it with a workspace, and note down the `Internal Integration Secret`. Insert this secret in the `Auth Token` field under the **Integrations** tab of your bot. - - - -2. Enable Notion Comment Capabilities under the **Capabilities** tab of your bot. - - - -That's it! Now the Notion integration is operational and ready for use within your bot. - - -Info - -To execute certain actions, identification of Notion entities like pages or databases is essential. These IDs can be derived from the URL while viewing the entity or by choosing "Copy Link" from the options menu. For more details, refer to [Get a Database ID - NotionDevelopers](https://developers.notion.com/docs/create-a-notion-integration#step-3-save-the-database-id). - +## Setup + + + + + You will need: + + - A [published bot](/get-started/quick-start) + - A [Notion account](https://www.notion.so/signup) and [workspace](https://www.notion.so/onboarding) + + + + + In Botpress Studio, select **Explore Hub** in the upper-right corner. + + + Search for the **Notion** integration, then select **Install Integration**. + + + In the **Configuration** menu, select **Authorize Notion**. + + + Follow the instructions to connect Botpress to your Notion account. + + + + + For advanced use cases, you can configure the integration manually using a Notion integration token. + + + You will need: + + - A [published bot](/get-started/quick-start) + - A [Notion account](https://www.notion.so/signup) and [workspace](https://www.notion.so/onboarding) + + + ### Step 1: Install the integration in Botpress + + + + In Botpress Studio, select **Explore Hub** in the upper-right corner. + + + Search for the **Notion** integration, then select **Install Integration**. + + + In the **Configuration** menu, select the drop-down and choose **Configure the integration using a Notion integration token**. + + + You should see two fields: + + - **Internal Integration Secret** + - **Webhook Verification Secret** + + Leave these empty for now—you'll come back to them after setting up the integration in Notion. + + + + ### Step 2: Create an integration in Notion + + Next, create a corresponding integration in Notion: + + + + Go to your [integrations page](https://www.notion.so/profile/integrations) in Notion. + + + Select **New integration**. + + + Enter an **Integration Name** and **Associated workspace** for the integration. Then, select **Save**. + + + Select **Configure integration settings**. + + + Under **Internal Integration Secret**, select **Show**, then **Copy**. + + + Go back to the integration's configuration menu in Botpress. Then, paste the secret into the **Internal Integration Secret**. + + + Select **Save Configuration**. + + + + ### Step 3: Give access to pages and databases + + For your bot to interact with your Notion workspace, you need to manually specify which pages and databases it has access to: + + + + In your Notion integration's settings, go to the **Access** tab. + + + Select **Edit access**. + + + Select the pages you want your bot to have access to. Then, select **Save**. + + + + ### Step 4: Configure webhook events (optional) + + If you want to use the integration's [Triggers](#triggers) and have your bot respond to events in your Notion workspace, follow the steps below: + + + + In the integration's configuration menu in Botpress, copy the webhook URL (starting with `https://webhook.botpress.cloud/`). + + + In your Notion integration's settings, go to the **Webhooks** tab. Then, select **+ Create a subscription**. + + + Paste the webhook URL you copied in the **Webhook URL** field. + + + Under **Select the events to listen to**, select the following events: + + - **Page created** + - **Page deleted** + - **Comment created** + + + + Scroll down to the bottom of the page and select **Verify**. + + + In Botpress, go to your bot's most recent [logs](/get-started/manage-your-agent/inspect#logs). Copy the verification token sent from Notion. + + + Go back to your Notion integration and paste the token in the **Verification token** field. + + + Select **Verify subscription**. + + + Finally, go back to the integration's **Configuration** menu in Botpress. Paste the verification token into the **Webhook Verification Secret** field. + + + + + + + Your Notion integration is ready to use. You can use the integration's [Cards](#cards) or [Triggers](#triggers) to interact with your Notion workspace. + --- ## Cards + +To use certain Cards, you might need to identify elements by their IDs. You can get page and database IDs: + +- From their URL while viewing them in your browser +- By choosing **Copy Link** from their options menu + + ---