Automate Database Relations in Notion with AI
Step-by-step walkthrough showing how to automate a Notion Relation between two databases using the AI Auto Relation integration.

AI Auto Relation is a Notion integration that automates a relation property in Notion using AI.
This article provides a detailed step-by-step walkthrough of how to create your first AI automated relation.
Here is an overview of what we'll cover:
- Step 1: Sign Up for AI Auto Relation
- Step 2: Link AI Auto Relation with Your Notion Workspace
- Interlude: Notion Databases & Relations
- Step 3: Design your Databases
- Step 4: Create and Share Your Databases
- Step 5: Define AI Auto Relation
- Step 6: Additional Configuration
- Step 7: Apply and Improve
Step 1: Sign Up for AI Auto Relation
If you haven't done so already, simply head to the AI Auto Relation website and create a new free account.

Step 2: Link AI Auto Relation with Your Notion Workspace
After you have signed up, you'll need to give the AI Auto Relation integration access to your Notion Workspace and Databases.
AI Auto Relation will prompt you to link the integration with Notion once you have signed up.

Interlude: Notion Databases & Relations
Since AI Auto Relation automates the updating of a relation between two Notion databases, it is critical to have a good understanding of both databases and relations.
Thankfully, there is some excellent official documentation from Notion available if you are looking for a refresher:
Step 3: Think About Which Databases You Want to Connect
This is where the fun starts!
You get to wield the magic of databases, relations and AI to bring some order into your Notion madness.
To get started, you'll need two databases that you want to create a relation between: a source database and a target database. AI Auto Relation will create a one way relation between the two databases.
For example, let's say you have a collection of recipes. The source database would be the one containing the recipes.

The target database would be the database containing the categories of recipes (breakfast, lunch, dinner, desert etc) and a description for each category.

Once you set up the Auto Relation, AI Auto Relation will automatically determine which category applies to each recipe and automatically add the categories to each recipe.

Here some other examples of database connections for your inspiration:
Source Database | Relation Property | Target Database |
---|---|---|
Tasks | Project | Projects |
Links | Belongs To | Categories |
Problem | Solves | Solutions |
Invoice | Issued To | Customer |
Exercise | Focsses On | Body Part |
Got an idea for what databases you want to use yet? If not, I am more than happy to have a chat, just reach out!
Step 4: Create and Share Your Databases
If the databases you want to use as source database and target database do not exist yet, create them.
You'll need to give the AI Auto Relation integration access to your databases. I've written a separate guide on how to do that if you aren't sure how to share a database with an integration: How to Share a Notion Page with a Connection/Integration.
It's probably also good to create some pages in both your source and target database at this point. The next steps will still work without it, but the results will not be very interesting since there will be nothing for the integration to do until there is data in the databases.
Step 5: Define AI Auto Relation
Now we can head to the AI Auto Relation dashboard.
Here, click on the + Add Auto Relation button.

First select the source database by clicking on Select database:

You can either scroll through the databases in the pop up dialog or search for your database by name:

If your database does not show up here, make sure you have shared it with the integration (see How to Share a Notion Page with a Connection/Integration).
Next, select the target database in the same way.
After you have selected the target database, the Create Relation Property button becomes available:

Click the button and provide whichever name you like for the new relation property, and click Create:

Note: If you cannot see the Create Relation Property button but see the name of a property instead, well done! You already have a relation property that AI Auto Relation can use. If you don't want to use that property, you can create another one in Notion and then select whichever property you like. Beware that if you choose to use an existing property rather than create a new one, AI Auto Relation will overwrite all values in that property when you enable it.
Step 6: Additional Configuration
We don't always need to change the following fields, and it's usually fine just leaving them at their defaults.
For this walkthrough though, I will go through each of them in detail.
Additional AI Instructions
In this section you can provide additional instructions the AI should keep in mind when determining which pages from the source and target databases are related.
You don't usually need to change anything under here as it works fine with the defaults.

If you do want to change it, I recommend keeping this as simple as possible, so we don't confuse the AI!
For instance, if you are only interested in having a maximum of one page from the target database linked to each entry of the source database, you could change the Number of Matches as follows:
- Number of Matches Desired: 0-1
Source Database Content & Target Database Content
You can also fine-tune what data the AI looks at to determine if a page is related to another page. Specifically, you can choose between Page content (blocks) and Value of specific property.

(1) Page content (blocks) refers to all the main content of a Notion page:

(2) Value of specific property refers to the contents of a specific property, such as Description in the following example:

Note: We never need to select the Title property for a database, since that is always included in the AI analysis. In the Tags database above, the title property is Name.
AI Model
You can choose the AI Model that AI Auto Relation will use to determine if pages are related.

Currently, GPT-4o and GPT-4o mini are supported. GPT-4o is only available after you've made a credit purchase. This is to prevent me being hit by unexpected AI costs. In any case, if you just want to give the improved model a try, just drop me a message and I can sort you out!
Processing Limits
Lastly, you've got the Processing Limits setting. This is important to keep our AI usage in check.
For instance, if you have a source database with 2,000 pages, and make only 1 change to your target database, we naively may need to re-check all 2,000 pages.
That quickly adds up!
Thus, AI Auto Relation uses a vector database to pre-filter which pages we will re-check, and it will limit the total number of pages to re-check for any one target database change to the limit defined here.

You can bump this up to 1,000 - but beware that may quickly chew through your credits. If you have any concerns about your AI credit usage, don't hesitate to reach out!
Step 7: Apply and Improve
After you are satisfied with the settings for our Auto Relation, you can click Create.
Just a reminder, if you selected an existing relation property, all values in your existing property will be overwritten! If you created your relation with AI Auto Relation, you don't need to worry about this.
After creating the Auto Relation, the status of the automation will be displayed on the dashboard:

It may take a few minutes for most reasonably sized databases to be processed. You will see the relation property get updated in Notion page-by-page as the integration processes your pages.
For larger databases, AI Auto Relation will provide an indication of how many pages it still needs to process.
If any errors occur, they will also be displayed here.
Just like HI (Human Intelligence), AI is not without its faults. Thus, it may take a bit of experimentation for your Auto Relation to work the way you'd like it to.
Here are some levers you can use:
- Provide clear descriptions for your target pages to help AI determine if they match a source page or not. Here an example of some categories I use to categorise SaaS and software tools:

- Provide matching instructions in your target pages for how AI should match it to source pages. Below are the instructions I provide to help AI match tasks to my Notion Auto Relation project:

Bonus tip: Sometimes it also helps also to specify what 'DOES NOT MATCH'.
- Don't expect magic! AI cannot guess your intentions. Try to remove any ambiguity in your descriptions.
- Use the smarter GPT-4o model. You can edit your Auto Relation to use this model after purchasing credits. GPT-4o allows for a much larger margin for error in providing your instructions. You can always switch back to GTP-4o mini after improving instructions. I use GPT-4o mini for all my Auto Relations and it works with 95%+ accuracy.
- Use AI to help with your descriptions. Heading to ChatGPT and asking it to review and improve descriptions in order to clarify them can often work wonders.
I hope this guide enabled you to create your first AI Auto Relation.
If not, please reach out, I am happy to help!