In this post, we will look at how you can integrate Notion with OpenAI and automatically update items in Notion database using OpenAI.
This automation requires a simple one-time setup, for which we will use Pabbly Connect.
Firstly, you’ll connect Notion to Pabbly Connect to capture newly added items. Next, you’ll link Pabbly Connect with OpenAI to generate content, and finally, save the generated content in a new row of your Notion database.
Steps to Automatically Update Notion Database Using OpenAI
1. Sign In / Sign Up to Pabbly Connect and Create a Workflow
2. Setup Notion as the Trigger App to Capture New Items
3. Setup OpenAI as the Action App to Generate Content
4. Setup Notion as the Action App to Store Content
Step 1:- Sign In / Sign Up to Pabbly Connect and Create a Workflow
A. Sign In / Sign Up
To begin this process, visit Pabbly Connect and create your account by clicking on the ‘Sign Up Free’ button. You can also click on Sign In if you already have an account.
Click on the Pabbly Connect ‘Access Now’ button
B. Create Workflow
To create a new workflow, click the ‘Create Workflow’ button.
Name your workflow, and click on ‘Create’.
Step 2:- Setup Notion as the Trigger App to Capture New Items
Let’s explore the process for connecting Notion and Pabbly Connect, which will enable us to retrieve items from your Notion database.
A. Trigger App
Trigger allows us to choose the application that will receive the data for Pabbly Connect. In our case, it would be Notion.
Choose ‘Notion’ as the Trigger App, select ‘New Database Item’ as a Trigger Event, and click on ‘Connect’.
B. Connect Notion Account
To connect with your Notion account, select ‘Add New Connection’, and click on ‘Connect With Notion’. Also, grant the necessary authorization.
Select the Database ID you wish to retrieve items from, and then click on the ‘Save & Send Test Request’ button.
Expand the Received Response section to check the items retrieved from your Notion database and confirm that the connection has been established successfully.
Step 3:- Setup OpenAI as the Action App to Generate Content
Action allows us to choose the application that will get executed by the workflow trigger.
Our goal is to generate content based on the topics obtained from Notion database with the help of OpenAI. Thus, OpenAI will serve as our Action App.
A. Action App
Choose ‘OpenAI’ as the Action App, select ‘Generate Content’ as an Action Event, and click on ‘Connect’.
B. Connect OpenAI Account
To connect with your OpenAI account, first select the ‘Add New Connection’ option. Then, enter your API Token as prompted. You can find your API Token by clicking on the ‘OpenAI API Keys page’ button.
Create your API token, then paste it into the designated field and finally click on the ‘Save’ button.
Choose the desired AI model for generating the scripts.
C. Enter / Map the Necessary Fields
Once you have successfully connected your OpenAI account, the next step is to map the items from the previous step. By implementing this mapping process, we ensure that our data remains dynamic and adapts to changes based on the received responses.
Give a Prompt by mapping the item obtained from the step above.
Similarly, select/enter the remaining fields that are required, while leaving any unnecessary ones blank, then proceed to click on the ‘Save & Send Test Request’ button.
After you click on Save & Send Test Request, OpenAI will automatically generate content on the topic you provided.
Step 4:- Setup Notion as the Action App to Store Content
Our objective is to store the content we create in our Notion database. This database may be the same one that provided us with the topic or a brand new one. Regardless, we must configure Notion as our Action App.
A. Action App
Choose ‘Notion’ as the Action App, select ‘Update Page’ as an Action Event, and click on ‘Connect’.
B. Establish Connection
Given that we are already linked to your Notion account, all you need to do is choose ‘Select Existing Connection’ and then click on ‘Save’.
C. Map Necessary Fields
Select the Database, map the necessary fields, and click on ‘Save & Send Test Request’.
The moment you click on Save & Send Test Request, the content will automatically be saved in your Notion database.
The automation process is finished. The integration between Notion and OpenAI has been successful. From now on, whenever a new item is added to your Notion database, it will be automatically used to generate content via OpenAI. The resulting content will also be saved in your Notion database.
You can copy this entire workflow by clicking this link.
Sign Up for a free Pabbly Connect account, and start automating your business
Subscribe to our Youtube Channel for more such automation
For any other queries, visit our forum