Has anyone worked with the WhatsApp API? I’m unable to send a text message with a line break using the API. I’ve tried using \n, \r, and %0a, but none of them worked. Each time, the message is sent with these characters as plain text instead of creating a line break.
Hi @Javeria_Rizwan, I had the same problem when pushing cases to Elastic. Eventually it worked for me when I used /n/n. Please let me know if it helps or if the characters are shown in plain text or not at all.
@ntoll01 When using forward slash, it shows as plain text. and I get an error when using a backward slash,
Hi @Javeria_Rizwan, it should be the backslash, the forward slash will always parse as plain text. If it breaks it might be because you’re not sending the value “Content-Type”: “application/json“ along with the header.
Could you give me some more info about the node which you use to do the API call?
Thank you!
Hi @ntoll01 I am using whatsapp send template node but, ‘/n/n’ is still showing as plain text.
I want to format my message with new line. but i am unable to add new line or line break.
Hi @Javeria_Rizwan , sorry for the delay. It seems that \n isn’t supported by WhatsApp, you should look into this: https://stackoverflow.com/questions/79342462/cannot-send-whatsapp-messages-with-new-lines-via-facebook-graph-api.
Otherwise check out the community node WhatsAble maybe the parsing is better, you can try it out with their free trial.





