Mapping an item in a Notion relation field weird error

Hi there!

I’m trying to automate a workflow in Notion. I have a Notion Wiki, which has some characteristics of a database and some characteristics of regular pages. One thing that makes a Wiki special is you can nest pages inside of other pages, and inside of blocks on other pages, so you get some hierarchy. For example, I have a toggle heading with some pages nested underneath it. This makes for good navigation in Notion. Here’s a screenshot. Note how Reliability, Security, etc. are nested under Operational Excelence…

Since a Wiki is also a Database, I’m able to set up some relation fields on my wiki. One I set up is “Parent page” which tracks the actual page-nesting hierarchy as a parent-child relationship field. My Make.com scenario is simply trying to sync the “Parent page” property with the actual page-nesting hierarchy. Otherwise, I would need to keep them synced up manually. I start with a Router that’s checking the parent type, because sometimes the parent type is database_id meaning this is a top level page, sometimes the parent type is page_id meaning this page is nested directly under some other page, and sometimes the parent type is block_id meaning this page is nested under some other block that’s contained within some other page. My router ignores top level pages (parent type database_id). For all Bundles where Parent.Type == ‘page_id’ I route directly to an Update Database Item module to set the relationship field by reading the Parent page_id property and that works perfectly…

and here’s a screenshot showing the success on that route…

My problem is in the other route. Whenever the Parent.Type is block_id, I have a loop calling the notion API to find the page_id of the page that contains this block. Thus, I iterate my way up to the proper page that I want to insert into the relationship field. I’m using some variables to “short circuit” my repeater, so that I don’t call the Notion API over and over unnecessarily. What’s important is that eventually, I do find the page_id that I want…

That’s my long looping chain, and it works all the way up to the last Update a Database Item module. For some reason, on this route, that module fails with an error “[400] Invalid property identifier Parent Page” for every single Bundle that reaches it. I can’t for the life of me figure this out. This module is configured exactly like the other Update Database Item module. The only difference I can tell is that it’s getting the Page ID from a different place?

I don’t know what to make of this. As far as I can tell, this Update Database Item is configured pretty much the same as the first on (that isn’t failing) with the same Database ID and with the Database Item ID mapped to the same field from the original “Watch Database Items” module. I’ve even verified in these error messages that the Parent page id that I’m trying to set is in-fact the UID of the page in the same table that I want to set it to. Also, I can set this relation manually in the Notion UI without any issues. Any idea why the Update Database Item module is failing?

Hi Joe,
I am not sure about the cause of the error message - but one step for troubleshooting could be using the Integromat browser extension to see what the actual API call on that module looks like. This way, you can check if the Notion page UID is actually being passed correctly

1 Like

Hey @Simo I’ve been able to verify now that this is a limitation with the Notion API v1. Even when I call the API directly, the following is always true with all Wiki pages:

  • When the Wiki page is a top-level page of the wiki (i.e. it is a direct child of the database) then it works
  • When the wiki page is a top-level child of any other page, it works fine.
  • When the wiki page is a child of some block on another page (e.g. it is the child of a toggle, or a callout, or even if it’s just indented, or to the right of any side-by-side layout on the page) then the Notion API returns an error that the property does not exist.

I can’t help but wonder if there’s some intelligent way to leverage Notions’ undocumented APIs. When you use dev tools on their site for example, their JavaScript calls back to /api.notion.com/v3 instead of v1.

Got it, thanks for sharing your findings @Sailor_Joe – I don’t know about the undocumented API; I never attempted to use it nor was aware of its existence

1 Like