Creating a bot in Chatfuel and Flow in Flowxo Response Path Error

(Ibrahim Idowu) #1

Hi,

I am creating a bot in chatfuel.

I created a flow in flowxo which runs a mysql query and sends result via message to the user.

But I receive the error below:

Invalid Response Path

I need an assistance on this.

(Daniel Beckett) #2

Hi @ibscrib

Flow XO can’t send messages back to the Chatfuel users, only users that have talked with a Flow XO bot.

1 Like
(Ibrahim Idowu) #3

I so much appreciate @DanielBeckett
I hope that I can always reach to you for further assistance

(Ibrahim Idowu) #4

@DanielBeckett Meanwhile I found a way around it by using a chatfuel api.

https://api.chatfuel.com/bots/<>/users/<>/send?chatfuel_token=<>&chatfuel_block_id=<>

But the issue i have now is, I am trying to get the columns of mysql query but its showing null

For instance: how do I pick cname in the json below

Result
{
“rows”: [
{
“ID”: 2,
“cname”: “Aid”,
“widjet”: “First”,
“ject”: “Eye”
}
]
}

(Daniel Beckett) #5

The docs for Data Outputs describe how to use data returned from outputs.

It looks like your output would be something like
{{taskname.data__rows__cname}}

Where taskname is the name of the action.

Hope that helps!

(Ibrahim Idowu) #6

@DanielBeckett

I have tried all my best here, still no result.

Could you help me look into this perhaps a teamviewer connection

Thank you

(Daniel Beckett) #7

Is the JSON that you shared what’s returned in the Interaction Logs in your flow?

(Ibrahim Idowu) #8

Status Code
200
Body
{“result”:“ok”,“success”:true}
Data
{
“result”: “ok”,
“success”: true
}

//Its is coming empty
Body
{
“cname”: “”
}

(Daniel Beckett) #9

Hi @ibscrib

If the webhook isn’t returning any data then there’s nothing to use in the flow :worried:

Are you sure that the request is working to get the data that you need?

(Ibrahim Idowu) #10

Hello @DanielBeckett

I appreciate your assistance so far.

Please see my flow below:

The RunQuery returns valid json, i need to get the key value pair from the json

Thank you

(Daniel Beckett) #11

If the SQL query is returning:
“cname”: “”

This indicates that either the query isn’t correct or that the field is empty.

If you’re getting a result in cname then the output for it could be:
{{taskname.data__rows__0__cname}}

(Ibrahim Idowu) #12

The SQL query returns valid data.

Result
{
“rows”: [
{
“ID”: 2,
“cname”: “Aid”,
“widjet”: “First”,
“ject”: “Eye”
}
]
}

so in the last activity in the flow, I get this:

Body
{
“cname”: “”
}

I had used Body and JSON in content type but to no avail

(Daniel Beckett) #13

If the result that you’re getting contains the data then you can use the docs for Data Outputs to see how to use data returned from outputs. :slight_smile:

For the exact webhook method required by Chatfuel you’ll need to check with their API docs to see what format they expect.

(Ibrahim Idowu) #14

Thanks @DanielBeckett

I will keep trying until it works

Appreciate

(Ibrahim Idowu) #15

@DanielBeckett

Now it is showing but i see this error in output

Status Code
400
Body
{“code”:400,“message”:“Unable to process JSON”}
Data
{
“code”: 400,
“message”: “Unable to process JSON”
}

(Ibrahim Idowu) #16

@DanielBeckett

I got over this finally.

I used the RAW option instead of JSON

Much thanks

2 Likes