"Unable to process JSON" when making HTTP Request to a Chatfuel bot

(Blago Yanakiev) #1

Hi all! This is my first bot and I’m not a programmer. Please help! :slight_smile:

Summary of my case: I collect user input with a Chatfuel bot and send it to flowxo.com via the JSON API. Flowxo does some calculations using a Google Sheet and returns a value, which I want to send back to Chatfuel and show to the user. In the case of the screenshot, the end value that should get shown to the user is simply the number 17.

Issue: Using the Webhook & HTTP > Make a HTTP Request action in Flowxo, I’ve configured it to send the value to Chatfuel, but I’m getting an error: “Unable to process JSON”

Could you advice what might be wrong?

(Daniel Beckett) #2

That response code is returned from Chatfuel so you really need to troubleshoot on that side to see why it can’t process the data that you’re sending.

1 Like
(Blago Yanakiev) #3

Thanks, Daniel! I’m waiting for their support to answer but no luck yet…

In the meantime, I found the following in their forum: https://community.chatfuel.com/t/sending-json-to-chatfuel-is-not-working/6992/13, according to which Chatfuel API “does not accept JSON messages at this time” and it can only accept variables.

Do you think I can set Flowxo to only sent the variable with its value of 17?

Thanks in advance!

(Karen Barker) #4

Hi,

You may be able to use the value to pass to ChatFuel as a variable on the URL. I’m not really sure what ChatFuel offer in this arena to pass data back into them. You’ll need to wait for ChatFuel support to get back to you there. :grimacing:

However - you could make this far simpler by cutting out ChatFuel completely and creating your bot in Flow XO as well as doing the calculations here. :wink: :grinning:

2 Likes
(Blago Yanakiev) #5

Haha, unfortunately, that would mean to transfer all content and logic from Chatfuel to Flowxo, which is only a viable option if there is an automatic way to do it?

(Ibrahim Idowu) #6

@bYanakiev

You can select Raw instead of JSON to make this work
{
“a”: “b”
}

1 Like
(Omar Alshareef) #7

hello , I have same problem , can you help me with this plzzz

(Karen Barker) #8

Hi Omar,

What error message are you receiving?

(Omar Alshareef) #9

thnx Karen,

the flow xo doesn’t send a result of calculate to chatfeul , i used http request to send the value form the sheet to the bot

i hope you can understand my english .

(Karen Barker) #10

Hi @Omar_Alshareef,

Rather than adding Content-Type = application/json in the Basic Authentication boxes this needs moving to the Headers section. If you click the +Add button just underneath where it says headers this will give you the option to move this information there. :slight_smile: