Hello! I’ve been having issues with my JSON record string in my Grist Add Records node. No matter what I try, I keep getting a Configuration Error that says “Make sure the custom expression contains a valid JSON object: [object Object]”. I have used JSONstringify on my form variable, since I believe that’s Javascript, but it doesn’t work. Below is a shortened example of the JSON string I am inputting:
[ { “fields”: { “Name”: {{JSON.stringify(steps.trigger.event.answers[5].answer)}},
** “Date_Request_Submitted”: {{JSON.stringify(steps.trigger.event.created_at)}},**
** “Language”: {{JSON.stringify(steps.trigger.event.flag)}} } ]**
The Data Records from Input after testing shows something like:
[ { “fields”: { “Name”: “Testing”, “Date_Request_Submitted”: “2024-08-26 22:39:01”, “Language”: “0” } } ]
So even though the JSON string seems to be read correctly, I still get the configuration error.
I’m also not certain JSONstringify would be the best solution either, since I have some fields that are multi-select fields, and using JSONstringify turns the data into something like [“Tuesday”,“Wednesday”,“Thursday”,“Friday”] instead of just Tuesday,Wednesday,Thursday,Friday which would not directly import this data into Grist correctly for me as a multi-select.