How do I automate Notion relationship between 2 different databases with Make?

Hi there,

I have two databases in place—one for customers and another for the company’s cashier. Whenever a new customer makes a purchase, MAKE automatically generates two items, both bearing the same name (the customer’s name) within their respective databases.

I’m seeking to automate the relationship between these two items post-creation in their respective databases. However, I’m a bit uncertain about the best approach to accomplish this. Any guidance on how I could achieve this would be greatly appreciated!

Thanks in advance!


Hi,
It sounds like you’re using two “Create database item” modules in your Make scenario.

If that’s correct, you can map the “page id” from the first module into the relation property you wish to populate in the second module

2 Likes

Hey, thanks for your attention, Simo. I’ve been trying a lot of things, but still without success. Is there anyway someone could help me with it? I’m not finding this “Page ID” tag, only “Database Item ID” or “Parent Page ID”. Thanks in advance.

Got it - “database Item ID” works (it refers to the page ID of the database item you want to relate).

Here is what you could do:

  1. Add a “set variable(s)” module after the “DB - Clientes” module on the first route. Name the variable “pageID”, and map its value from the “database item ID” of the “DB - Clientes” module

  2. On the second route, add a “get a variable(s)” module. Retrieve the “pageID” variable by typing “pageID” in the dedicated box

  3. On the second route, in the “DB - Financeiro” module, map the “pageID” value from the “get a variable(s)” module into the dedicated relation property you would like to populate

1 Like

I did exactly what you told me to do, and voilà: the automation is running perfectly. Thank you very much, Simo. Make and its community are awesome. I’m becoming a great fan here.