I try sending a POST from Retool to Notion. It works with Postman but fails in Retool. My sample payload:
{
"parentRef": { "dbID": "db98765" },
"dataFields": {
"TaskTitle": { "value": "Retool Task" },
"UrgencyLevel": { "choice": "High" },
"CategoryLink": { "ref": "cat56789" },
"DetailsText": { "description": "Task details go here" }
}
}
What could be causing this error?
I encountered a similar problem when transitioning from testing an API in Postman to using Retool. In my case, the issue stemmed from how Retool was handling content-type headers and the payload encoding. Even though Postman automatically set everything up correctly, Retool requires a more manual configuration. I found that explicitly setting the JSON content type and ensuring that the payload is stringified or formatted correctly solved the issue. A systematic check of device logs also helped me pinpoint minor mismatches in the payload structure that could lead to these errors.
During my integration of Retool with Notion, I encountered similar issues and eventually determined that even though Postman handles requests gracefully by default, Retool required more explicit settings. In my case, incorrect or missing headers, especially regarding content type, led to errors in the payload transmission. I solved this by manually setting the content type to application/json and carefully reviewing the formatting of the payload. I also checked all request parameters against Notion’s documentation to ensure everything lined up correctly. Although small, these differences can have significant impacts on the request’s success.