Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
21.23k stars 1.43k forks source link

Zapier Automation 400 Error on Longformfields #13927

Closed byebb closed 2 weeks ago

byebb commented 3 weeks ago

Hosting

Bug Description If I submit a text that contains line breaks such as

""" My awesome

comment to submit """

and forward it to an automation the uses a Zapier webhook, then the json payload of my Longformfield for the comment is invalid, as JSON does not allow linebreaks inside the value strings.

I tried to find a solution to create temporary values cleaning up the string, but I think it would be good to find some way to submit the text including these line breaks.

What would be the way to go?

I want it to have it in a google docs sheet in the end.

Screenshots image

Desktop:

The issue should be quite clear. I wonder what the best solution is

linear[bot] commented 3 weeks ago

BUDI-8350 Zapier Automation 400 Error on Longformfields

ConorWebb96 commented 2 weeks ago

Hey @byebb,

Please check what you are sending is valid JSON. The output error you are getting there isn't valid JSON.

byebb commented 2 weeks ago

Hey @byebb,Please check what you are sending is valid JSON. The output error you are getting there isn't valid JSON.

That is exactly my issue. I know the JSON is not valid, but that is exactly my issue. I don't know how to solve this and would rather expect that the Longformfield would deal with itself.

I'd love to create a custom variable based on that field to replace all line breaks with another character, but I just can't get into the variable.. since the payload field of the Zapier automation does not allow me to manipulate the variable before I create the JSON payload via Javascript.

byebb commented 2 weeks ago

BUDI-8350 Zapier Automation 400 Error on Longformfields

Unfortunately, I cannot open this:

image

Can you put the relevant information you are referring to here?

ConorWebb96 commented 2 weeks ago

You can use a combination of a few different steps e.g. JS scripting block (to format the JSON however its needed for Zapier to accept.) + backend log (can view whatever you are outputting that has been created via the js scripting step)

If you are simply applying Zapier with string on its own, its likely not going to accept it.

Going to convert this to a discussion as it isn't a bug.