Notion: update by URL not working (for guest-added pages)

Describe the problem/error/question

I do a project for my client. Right now it’s built on my Notion page and I address pages by URL. I invited the client as a guest on my page to add content and enjoy automations. But he complained about errors.

So I guess that Notion nodes fail when deal with guest added DB items. When I changed addressing from URL to ID, it works fine.

What is the error message (if any)?

ERROR: Database Page parameter’s value is invalid. This is likely because the URL entered is incorrect

NodeOperationError: ERROR: Database Page parameter’s value is invalid. This is likely because the URL entered is incorrect at extractValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/ExtractValue.js:134:15) at getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1643:54) at Object.getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:2342:24) at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Notion/v2/NotionV2.node.js:392:83) at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:725:42) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:673:66 at processTicksAndRejections (node:internal/process/task_queues:95:5) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1085:20

Please share your workflow

These are screenshots:

For guest-added page, URL addressing:

For guest-added page, ID addressing:

Information on your n8n setup

  • n8n version: 1.49.0
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker-compose
  • Operating system: Ubuntu 22

Hey @artildo,

Can you share the full URL you are using? I suspect the issue could be with how we parse the url and we need to tweak it slightly for guest / public pages.

Hi @Jon

This is the page URL created by me (owner): https://www.notion.so/artemdzyuba/0d1442072cf741959f8dfee9be931c05

These are the page URLs created by the guest:
https://www.notion.so/artemdzyuba/3-bafe4d28fc8945ca908a9b469917a5df
https://www.notion.so/artemdzyuba/2-d66f5f696a744be8b3a0c3ff2e8a7819
https://www.notion.so/artemdzyuba/1-2b25225946c644279d748fda4e09073e
https://www.notion.so/artemdzyuba/680b1a2431ca4c95b7a94f636c224718

Hey @artildo,

Does that bottom guest page url fail? It looks like it should be valid to me assuming the integration has access to it.

With the other 3 guest urls how are they being created?

@Jon

I have 2 options to add a page:

  1. Through the DB itself (like clicking the + button in the bottom or the blue one)
  2. Through a separate button

After some tests with another Notion account I found that these “1-”, “2-” pages appeared only when I clicked the bottom button.

But after I did it for several times and also created pages with other buttons, it suddenly resolved. No more "bad pages further than “7-…”.

So the pattern is unclear for me.

Hey @artildo,

Was the URL just taken from the browser page or from the share link?

@Jon

It was copied from the browser window

Hey @artildo,

I have worked out what the issue is and I will get a fix put in shortly.

Created a PR which can be found below, Once reviewed it will be merged and available in a future release.

@artildo – Thanks for raising this topic. I found a similar bug today, and left feedback on @Jon’s PR. Hopefully it can be merged, released, and deployed soon!

Spotted the feedback thanks @jerzygangi and welcome to the community :raised_hands:

New version n8n@1.52.0 got released which includes the GitHub PR 10070.

Hello came across the same issue. See below.
I’m self hosted on version 1.55.3

I’m using the notion “archive” node based. Both Id and Url produced the same errors. I’ve been testing individual url and they point to existing page.

I should also say it was working last week and I believe I upgraded to the latest version over the week-end.

Thanks for your help,
Best
Julien

{
“errorMessage”: “ERROR: Page parameter’s value is invalid. This is likely because the URL entered is incorrect [item 0]”,
“errorDetails”: {},
“n8nDetails”: {
“nodeName”: “Notion1”,
“nodeType”: “n8n-nodes-base.notion”,
“nodeVersion”: 2.2,
“resource”: “page”,
“operation”: “archive”,
“itemIndex”: 0,
“time”: “8/27/2024, 6:55:18 PM”,
“n8nVersion”: “1.55.3 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeOperationError: ERROR: Page parameter’s value is invalid. This is likely because the URL entered is incorrect”,
" at extractValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/ExtractValue.js:134:15)“,
" at getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1654:54)”,
" at Object.getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:2361:24)“,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Notion/v2/NotionV2.node.js:486:83)”,
" at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:42)“,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:673:66”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1104:20"
]
}
}

@Rowingbobcat I’m experiencing the same thing just today. I wonder if they’ve released any fix for this already. Did you notice any change/fix in the functionality?

There shouldn’t have been any changes to this since 1.52.0 earlier this year so if it was working after that it should still be working :thinking:

It does look like some page URLs are now different and we have an internal dev ticket created to update that in the future.

I also did start to experience the error message, out of the sudden since ~ last week.

ERROR: Block parameter's value is invalid. This is likely because the URL entered is incorrect

For now, have only issue with the Notion Node:

Resource: Block
Operation: Get child blocks

Currently on n8n 1.59.2.

Thanks @Jon for investigating!

Hello
I think the same problem happens with the Notion Update Page module, Operation : “Archive”, when the page is a Database Page
thanks for looking into this

Can you make sure you are on at least 1.61.0 and see if you have the same issue.

I’m on 1.59.4 and will update. Thanks

I updated and I still have the issue “ERROR: Page parameter’s value is invalid. This is likely because the URL entered is incorrect”