Skip to main content

Hi folks,

 

I am reading a Google sheets cell content into a custom POST request (Webhooks by Zapier). The problem is that I the input has several line breaks, which is not allowed in the JSON file. Is there any way to get rid of the line breaks or format the input with Zapier, so it won’t break the call?

 

"metadata": {

"body": "MEMBER_TO_MEMBER <br> Nachricht: "<p>Hi Tobias,

vielen Dank für deine Rückmeldung. Der 17. Juni klingt super, habe es mir im Kalender notiert. Unter welcher Nummer kann ich dich am besten erreichen?

Einen schönen und erholsamen Urlaub wünsche ich dir und wir hören uns dann im Juni.

Liebe Grüße

Luisa</p>"

}

Hi @LuisaFromCasana, welcome to the Community!

 

Are the line breaks in the information from the cell in Google Sheets? If so, then you can remove those using a Formatter step. Add a step between the Google Sheets step and the Webhooks step and choose the Formatter by Zapier app. 

Select the option to work with text and then for the Transform field, choose ‘Replace’

 

For the input, add the information from Google Sheets

For the find field, what you need to use depends on how the text is formatted in Google Sheets:

  • >:newline:] - for  (\n) characters
  • l:return:] - for carriage-return (\r) characters

Then leave the ‘Replace’ field blank to remove any of those characters.

 

Finally, in your Webhooks step make sure you use the output of the Formatter step, rather than the original Google Sheets information.