Hello Zapier Community!
I am having a little trouble with adding to a JSON array using line items. In my Zap, I get an array object from a webhook to Clubhouse (https://clubhouse.io/api/rest/v3/#Update-Story). This array can have any number of items in it, and they are all URLs.
My goal is to add to this array. In order to do this, I am converting the line items to text, appending the new URL from my trigger, and then attempting to pass that array to a webhook to Clubhouse
The problem is when I attempt to pass that array though the webhook back to the API, I get a “The app returned "Malformed JSON in request body.".” error. When looking at the data, I see that the URLs are all missing the quotations they should be surrounded in.
Any ideas on how I can surround the URLs with quotations? Or get the Text to Line Item to include the quotations?
Thanks so. much for your help!
Best answer by GetUWired
Have you tried just using the utilities > line items > line itemizer to append more urls. If you are truly putting an array into the field I wouldn’t think you would need to specify that each element in the array is wrapped in quotes.
If it is a text field. You can replace the commas with commas surrounded by quotes by using a text formatter action, searching for a comma, and then replacing it with “,”. Then you would just need to tack on “ before and after the text field and voila!