I am trying to complete a task to allow when a URL is entered into the Bookmarks Notion DB, ChatGPT creates up to 3 labels (tags) and a short description for the URL and adds it to the Bookmark entry in the Bookmarks Notion DB, and the Labels to the Labels Notion DB.
I am at the point where ChatGPT is putting out the response in JSON, and I am able to pick out the ‘labels’ and ‘description’ seperately. However, I’m getting stuck on how to ensure I am able to update both the Labels DB in Notion, and the Bookmark DB in Notion with the URL entry that was original referenced.
You can see the scenario workflow from a high level below.
From ChatGPT we get for a URL such as cbc.ca/news/ :
{
"label": ["Canadian news", "CBC", "current events"],
"description": "CBC News is a Canadian news platform providing up-to-date coverage on national and international news, politics, and current events."
}
Then it goes through a JSON parser which results in:
This is where I’m having trouble - and I’m pretty new at a lot of this - but have tried to use the AI to guide me with little success. I need to be able to update the ‘Description’ field for the Bookmark DB, and then add the Labels to the ‘tags’ field in the Bookmark DB, which is pulled/managed by the Labels Database.
Any help is appreciated - thank you!
Update:
I appear to have the majority of it working, but it’s running into issues at the end.
The operation failed with an error. [400] body failed validation. Fix one: body.properties..title should be defined, instead was `undefined`. body.properties..rich_text should be defined, instead was `undefined`. body.properties..number should be defined, instead was `undefined`. body.properties..url should be defined, instead was `undefined`. body.properties..select should be defined, instead was `undefined`. body.properties..multi_select should be defined, instead was `undefined`. body.properties..people should be defined, instead was `undefined`. body.properties..email should be defined, instead was `undefined`. body.properties..phone_number should be defined, instead was `undefined`. body.properties..date should be defined, instead was `undefined`. body.properties..checkbox should be defined, instead was `undefined`. body.properties..relation should be defined, instead was `undefined`. body.properties..files should be defined, instead was `undefined`. body.properties..status should be defined, instead was `undefined`. body.properties..id should be defined, instead was `undefined`. body.properties..name should be defined, instead was `undefined`. body.properties..start should be defined, instead was `undefined`.