How to send image url to templates dynamically

I have created a template in domain.yml -


  • text: “Pizza Name: {pizza_name} with \n Description: {description}”

    image: “{image_url}”

In facebook messenger when the user queries to get a list of pizzas an action is run in which i call -

dispatcher.utter_template(“utter_pizzas”, tracker, image_url=obj[‘imgPath’], pizza_name=obj[‘name’], description=obj[‘description’])

the obj is the object which I get from some backend query (GET response)

The text is getting populated but the image in facebook messenger in not showing.

Can anyone please help?

1 Like

Hi @iamrajatroy, as of right now, slots or keyword args only populate in the text field of an utterance.

Is there any way I can send image from my backend to FB messenger?

Sorry for missing this response! Someone actually added a method to utter images from custom actions:

I’ll cut a new release of SDK tomorrow so that that can be used. We also have community members working on the population of the fields other than text.

1 Like