I am trying to fill a relation property of Notion. I think it is not possible to create it with all the relation id values, so I created the page and then I update it to add the rest of the relation ids.
I tried to use map() but it returns error:
The operation failed with an error. [400] body failed validation: body.properties.Activity.relation[1].id should be a valid uuid, instead was "eae85750-308b-42cf-84b1-51c1c350aaf6, a2f27ea7-e503-48....
in your video you fill in the relation property at the same time, you don’t use the add() function.
I think the problem is that I am trying to add the current relation page as well.
How can I modify the array so that it only contains the ID values that do not exist in the current relation property?
For that, you would first retrieve all the existing items in the relation property of the database item (you could use the “get database item” module or “search objects” module for this); and then use the “merge” function in the final module when creating/updating the database item. I tested this approach and it worked well - let us know how it goes for you