1

I am using chatfuel for a pet project (which is connected to a facebook page, so the conversation happens in fb messenger), and trying to integrate with an external API using the JSON API plugin. The external "API" is a Zapier Zap running a few lines of python code. For the purpose of fixing this issues, I've trimmed the code down to:

return {"text": "The result is 4."}

I am successfully sending messages out to Zapier, but I never see replies back into chatfuel, despite having tried various combinations. My initial attempt was to follow the example in chatfuel's documentation:

return {
 "messages": [
   {"text": "Welcome to our store!"},
   {"text": "How can I help you?"}
 ]
}

but that didn't work either (as in: these messages are never displayed in my facebook. There must be something I'm missing, maybe beyond the scope of these lines of code? Any hints would be welcome!

Laurent S
  • 4,106
  • 3
  • 26
  • 50

1 Answers1

2

I encourage you to use Broadcasting API from your backend if it is possible. In this way, you will call your endpoint using JSON API and then your server logic using Broadcasting API will start particular Block from your Chatfuel project. You also can pass some user attributes. This is how I use this in my projects.

Angel Tsvetkov
  • 401
  • 2
  • 9