Notion Node Bug: The relation id "fffbfe90567a-8132-b56d-c3acc1e8eb71" is not a valid uuid with optional dashes

The relation id “fffbfe90567a-8132-b56d-c3acc1e8eb71” is not a valid uuid with optional dashes.

{
  "errorMessage": "The relation id \"fffbfe90567a-8132-b56d-c3acc1e8eb71\" is not a valid uuid with optional dashes.",
  "errorDetails": {},
  "n8nDetails": {
    "nodeName": "Create Contact",
    "nodeType": "n8n-nodes-base.notion",
    "nodeVersion": 2.2,
    "resource": "databasePage",
    "operation": "create",
    "itemIndex": 0,
    "time": "8/21/2024, 6:37:30 PM",
    "n8nVersion": "1.54.4 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "NodeOperationError: The relation id \"fffbfe90567a-8132-b56d-c3acc1e8eb71\" is not a valid uuid with optional dashes.",
      "    at Object.uuidValidateWithoutDashes (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Notion/shared/GenericFunctions.js:44:11)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Notion/shared/GenericFunctions.js:305:54",
      "    at Array.filter (<anonymous>)",
      "    at Object.getPropertyKeyValue (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Notion/shared/GenericFunctions.js:304:22)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Notion/shared/GenericFunctions.js:419:29",
      "    at Array.map (<anonymous>)",
      "    at Object.mapProperties (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Notion/shared/GenericFunctions.js:417:10)",
      "    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Notion/v2/NotionV2.node.js:253:111)",
      "    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
      "    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:19)"
    ]
  }
}

Does anyone face this issue on Notion: Create Database Page on the latest version?

I previously didn’t have any of this issue but suddenly kept popping up.

1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
  • n8n version: 1.54.4
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Linux

Default settings from Docker Image

Deployed on Fly.io

I realised that I only get this issue when the relation id start with “fffbfe90-567a…”

2 Likes

Hi @justincheu

Thanks for posting here and welcome to the community! :tada:

Could you share your workflow so we can try to recreate the issue? You can share your workflow here by pasting them as JSON in between two block quotes (```).

How do you select the ID? Does it work when you access it from the list drop-down?

Hey,
I have the exact same issue but when my relation id start with “fff0c6326ae881”.
it does not recognize the URL with the above string in the ID. For all the others my workflow works perfectly.

Describe the problem/error/question

My workflow is just 2 nodes :

  • Get many database pages
  • Update the table with the URL from previous node.

Works perfectly but crashes for the url like the folllowing ones (removed the last characters):
https://www.notion.so/1088-fff0c6326ae88120adf3f811d*******
https://www.notion.so/1003-fff0c6326ae881d19046c9678*******
https://www.notion.so/1289-fff0c6326ae8813e9470f7bf8*******

which all contains “fff0c6326ae881”

Node 1:


Node 2

What is the error message (if any)?

For the Non working urls, I have the following message : (I opened manually the URL they work)
Error Message

I dont know how this could be solved.
For the moment, I just delete the pages with these characters in the URL and create new ones but it is not a real fix :smile:

Thank you very much for you help !
Have a nice day
Mathieu

n8n version: 1.31.2

Hi @Mathieu_OLIVIER

Can you please update your n8n version? We had a bug fix for the Notion node recently and it went out with 1.52.0

@justincheu
Can you actually check that the database pages that you are trying to access have the n8n integration connected? See more about this in our docs:

2 Likes

Thank you very much, I updated to 1.56.2 and it works like a charm.

Many thanks for your quick support.

2 Likes

Hi! The bug seems to be still there for me on version 1.58.2. I am encountering the same error, with newly created pages whose id starts with 100. For example these ids cause the error

1004827f-2478-80d2-83d5-fc0a70663320
1004827f-2478-81c6-adc7-f7824eaf503a

while id 42822e11-4c21-4c62-9d9c-5cfb284ea6ab does not.

Here are some screenshots for both the error and success cases.

I didn’t have any issues with the same workflow previously. I tried deleting the pages causing the error and creating new ones, but it seems only the old pages do not lead to errors, while the new pages are causing the exception.

I have the same issue. Updating to 1.58.2 did not solve the issue.

The error message:
The relation id “101823db-8610-81c5-a069-c20dac072ce5” is not a valid uuid with optional dashes.

BUT: It did work after updating the node itself to 2.2 (just using a new create page node). :white_check_mark: < this is not true

Edit: After checking once again, it sadly did not work.

Thanks for your suggestion. After creating a new Notion node, I see its version is 2.2, whereas my old node was on version 2. However, the issue persists, as you can see in the screenshot below where I tested the uuid “1004827f-2478-81c6-adc7-f7824eaf503a”

Yeah, I checked it again. It is not working. :frowning:

I think I have found the error. The problem is the UUID version. The third block shows the version: in the given codes version 8:

CleanShot 2024-09-14 at 21.03.26

But they used to be codes with version 4 in Notion. Now they seem to have switched to v8 of UUID, for whatever reason.

This code therefore fails:

Why, because the library used cannot report the v8 as valid:

Can someone please fix this? @ria ?

Workaround:

HTTP Node with Patch to https://api.notion.com/v1/pages/{{ pageid }}

and JSON-Body:

{
“properties”: {
“FIELDNAME”: { “relation”:[
{
“id”: “{{ json.id }}”
}
] }
}
}

2 Likes

Thanks, your workaround is working for me. I hope the fix will be released soon🤞

1 Like

Can confirm I’m experiencing the same issue. Unable to Create or Update via the Notion node.

2 Likes

Hello, could you show the node you created for that Workaround?

1 Like

Here is the workaround node

1 Like

@bartv Can you help us out? I think it is a major bug, as currently a lot of my workflows fail and I don’t want to patch all of them. The solution is pretty simple, just deactivate the UUID check, as the Notion API itself also checks it.

2 Likes

If you use docker like me, you can temparily disable the check on the uuid, by building your own image. In a folder place a file named “fix_notion_bug.sh” with this code

#!/bin/sh

FILE="/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Notion/shared/GenericFunctions.js"

if [ ! -f "$FILE" ]; then
    echo "Il file $FILE non esiste."
    exit 1
fi

NEW_FUNCTION='function uuidValidateWithoutDashes(value) {
    return true;
}'

awk -v repl="$NEW_FUNCTION" '
/function uuidValidateWithoutDashes/ {
    print repl
    found = 1
    next
}
found && /^}/ {
    found = 0
    next
}
!found {
    print
}
' "$FILE" > "${FILE}.tmp" && mv "${FILE}.tmp" "$FILE"

if [ $? -eq 0 ]; then
    echo "Successful replacement in $FILE."
else
    echo "An error occurred"
    exit 1
fi

then in the same folder create a file Dockefile with this content

FROM n8nio/n8n:latest

USER root

WORKDIR /home/node

COPY fix_notion_bug.sh /home/node/fix_notion_bug.sh

RUN chmod +x /home/node/fix_notion_bug.sh && /home/node/fix_notion_bug.sh

USER node

ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]

Build your Dockerfile with “docker build -t n8n-custom .” and then run the image “n8n-custom” as you do with the official one.

2 Likes