Line break is gone when parsing text

(Khashayar) #1

Hey, I had a flow using this and it worked for a long time - now it doesn’t anymore. Did you change anything?

So this is the problem: I’m asking for data from an API that basically gets its data from an XML document. In the JSON, I have this: {{make_a_http_request.data__objects__0__content__en}} as the content of the message. This is the raw text of that:

https://jsoneditoronline.org/?id=c03956bd43c8495924c840cf5017465f

But FlowXO always shows it as:

https://jsoneditoronline.org/?id=5069dfd572251911475dcbd5484e2260

As you can see, for some reason Flowxo now ignores the line break. In other words, FlowXO implements the line-breaks at the moment of receiving the webhook. Straight out of the webhook, the data doesn’t have visible \n but is broken into segments.

I want to clean up the tags (of the raw response) with this regex: /<(.|\n)*?>/g
And then split them by \n - so that I can show each section in one message

Does that make sense? The line break characters never show up for me to split the string with.

I’m 100 percent sure that this worked a few months ago using the same data in the same flow…

(Khashayar) #2

If this is by design for the Webhook action, I’d appreciate if you could give me a Code block that could do the same

(Daniel Beckett) #3

Hi @kcfl

I’m not aware of any changes that would cause received data to be interpreted differently but unfortunately if the /n isn’t showing in the output from the webhook then it can’t be used to format the text. Could you use a similar regex to split based on the closing paragraph tags instead? e.g. </p>