Image two Notion databases, linked by Relation: “Opportunities” and “Companies”.
I am using Make to update records in “Opportunities” via the Notion module “Update a Database item”.
But I’m hitting a problem when it comes to updating the relational field…
When the record does not exist in “Companies”, Make.com reports: [400] body failed validation: body.properties.Company.relation[0].id should be a valid uuid, instead was “Acme Inc”.
It also fails when I pass a plain-text value of the title of a record which does exist.
This is because Notion is expecting the record ID.
If this were the Airtable integration for Make.com, I think there is a way of “upserting”/creating records where they don’t exist, conveniently. But I don’t see that option.
What rigmarole do I need to go through to…
a) Check whether the record exists and use that, or
b) Create it if it does not, then set that?
In my experience, you can implement this via a Router with 2 routes after a “Search objects” module where you would search whether the Company already exists in Notion:
If the record exists
→ Update database item as you’re doing (and pass the pageID in the relation property)
If the record doesn’t exist
→ Create database item (the company)
→ Update database item (opportunity) (and pass the pageID from the previous module in the relation property)
Thanks. I was afraid this was the answer. Totally makable - but not equivalent to the Airtable module’s very handy ability to create new records where they don’t yet exist. Understandable, perhaps - the Notion API is pretty tricky, compared with the Airtable API.