Notion VIP Logo
BulletproofA-to-ZConsultingThe Streamline

Automate Notion Relations with Zapier

Zapier is essential to architecting a cohesive and streamlined system with Notion. It powers automations an integrations with other apps. But a persisting limitation is Zapier’s inability to update Relation properties. As a workaround, we can directly access the Notion API with the Code by Zapier action.

Let’s walk through the configuration with a hypothetical scenario. Members of Notion A-to-Z enjoy access to the functional demos and Zap template. If you’ve yet to join, we’d love to have you onboard.

For this tutorial, you’ll want to have an existing Zapier account and basic familiarity with Zaps, including the Webhooks by Zapier trigger.

The Scenario

As a framework for our configuration, imagine…

We’ll leave the form to your imagining. Let’s build the rest.

Generate a token.

In Notion, an integration connects a workspace with third-party apps, like Zapier. Each integration includes a token that allows other apps to exchange information with Notion and make updates to the workspace.

  1. Visit
  2. Create a new integration with a name like “[Workspace] :: Zapier Extension.” Ensure your intended workspace is selected, then Submit.
  3. Leave the tab open for copying the Internal Integration Token later.

Create the databases.

Within a Notion page:

Add your integration.

To the page containing your Submissions and Countries databases, add your integration:

Create the Zap.

Step 1 (Trigger) — Receive the webhook.

Step 2 — Create item in Submissions.

Step 3 — Find the country.

Step 4 — Relate the country. ✨

This is where the magic happens.
let requestURL = '' + inputData.updatedPage; let bodyJSON = JSON.stringify({ "properties": { [inputData.propertyName]: { "relation": [ { "id": inputData.relatedPage } ] } } });

fetch(requestURL, { method: 'PATCH', headers: { 'Authorization': `Bearer ${inputData.token}`, 'Content-Type': 'application/json', 'Notion-Version': '2022-06-28' }, body: bodyJSON }) .then( response => response.json() ) .then( response => { callback(null, response) });

For anyone who may be curious:

To Relate multiple pages, you can add additional objects within the relation key’s array.

Once you’ve successfully configured the demo, bolster your Notion automations with Relation property updates. If you hit any snags along the way, shoot me your questions on Twitter, LinkedIn or YouTube.

All-in on
the all-in-one
productivity app.
Subscribe →