One of the limitations with the Update Database Item action in Notion’s standard Zapier integration is that it doesn’t allow you to update Relation properties. For example, you might have a Contacts database and a Companies database in a Notion CRM setup, and it saves a lot of time if you can automate linking records between the two based on a Contact’s email address and domain.
Fortunately, updating Relation properties is supported by Notion’s API, which means that you can pull this off by building a Zapier Custom Action:

The code is down below, but Custom Actions are meant to be built with natural language prompts, so just create a new action, and tell the AIn something like:
Build an action to update a relation property in a Notion database. Allow the user to select the database from a drop-down menu. Then:
- Allow the user to provide the name of the relation property to update
- Allow the user to provide an array of Page IDs, which will be the values to update in the relation property.
Once you’ve tested and got it working, using it in a Zap is super simple. The only slightly confusing part is which page is the source database and which is the destination database, and I clearly could have done a better job naming my variables here, but otherwise it works great!

// Define the function to update a relation property in a Notion page
export async function updateNotionRelationProperty({
pageId,
relationPropertyName,
pageIds
}: {
pageId: string; // Page ID is a standard string field
relationPropertyName: string;
pageIds: string;
}): Promise<{ result: string }> {
// Construct the URL for the Notion API endpoint using the Page ID
const url = `https://api.notion.com/v1/pages/${pageId}`;
// Convert the line item array input (comma-separated string) into an array of objects
const relationArray = pageIds.split(',').map(id => ({ id: id.trim() }));
// Prepare the request body with the relation property update
const requestBody = {
properties: {
erelationPropertyName]: {
relation: relationArray
}
}
};
// Make the API request using fetchWithZapier
const response = await fetchWithZapier(url, {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
'Notion-Version': '2022-02-22'
},
body: JSON.stringify(requestBody)
});
// Throw an error if the response is not OK
await response.throwErrorIfNotOk();
// Return a success message
return { result: 'Relation property updated successfully' };
}