API is initialized but fails when i put in data

hi bubblers

i have an issue with an API action that i cant figure out

the call is inititialized but as soon as i put in dynamic data it comes with an error

link til doc is here:

Check your dynamic values. It is possible that they have character issue for JSON. It is a good idea to use JSON safe function for the values.

1 Like

Remove the new lines/line breaks from your arbitrary text as that puts \n in the JSON which breaks the formatting.

In addition, always use :formatted as JSON safe. Even if you fix the above, your JSON would break as soon as your text input contains a new line or a quotation mark, etc. This is because that would break the JSON formatting. Use "text": Arbitrary text:formatted as JSON-safe or "to": Result of step 1:formatted as JSON-safe. formatted as JSON-safe will include the quotation marks.

2 Likes

aah that make sense.. thank you :smiley:
but just to be sure you mean like this right?

Yes! Do the same for company name too, as users could enter quotation marks or other JSON breaking characters there.

1 Like

thank you very much.. that did the work :blush: