Skip to main content
Solved

Issue with Multi-line Messages from Instagram Direct and External Requests in ManyChat

  • 14 June 2024
  • 1 reply
  • 112 views

Amirreza

I'm facing an issue with ManyChat and Instagram Direct messages and could use some help.

When I receive a message from Instagram Direct in ManyChat, I store it in a variable called message and then send it to a server using an external request. Everything works fine except when the user uses the enter key to go to the next line in their message. Because the message goes to the next line, using this variable in the JSON body causes an error.

For example:

Message:

Hello

How are you?

External request JSON body:

{

"message": "message"

}

This causes a problem because the JSON body ends up looking like this:

{

"message": "Hello

How are you?"

}

The problem is that \n is not being used for multi-line messages, which breaks the JSON structure.

Does anyone know how I can resolve this issue? I would greatly appreciate any guidance or suggestions.

Thank you!

Best answer by Gustavo Boregio

Remove the quotes (" ") and check the 'Encode to JSON' option after clicking on the Custom Field. Like this:

 

View original

Gustavo Boregio
Forum|alt.badge.img+6

Remove the quotes (" ") and check the 'Encode to JSON' option after clicking on the Custom Field. Like this:

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings