Hey Guys,
I am using my bubble app for our Sales Team to send SMS to our clients using twiliio which works great.
Additionally, I am now trying to track the sms in our CRM Tool (PipeDrive). For this I am using a simple POST Request with following body to create the activity in PipeDrive:
{
"subject": "Sent SMS",
"done": "1",
"type": "sms",
"user_id": "xxxxx",
"deal_id": "xxxx",
"note": "This is just a sample text"
}
According to their API Description PipeDrive API the note field has to be in HTML Format.
I am using a Multiline Input field for the content of the SMS.
Therefore after dynamically inserting the data the Call looks like this:
{
"subject": "Sent SMS",
"done": "1",
"type": "sms",
"user_id": "xxxxx",
"deal_id": "xxxx",
"note": "This is just a sample text
with stupid line breaks"
}
The line breaks from the multiline input are causing the API to return an error as it is the wrong format.
Does anyone know how to transform the multiline text into single line text?
Thanks a lot in advance for your help!