Hi,
I’m trying to add a fulfilment response using Webhook.
I built a kind of simple Python API with Flask to provide a rich content answer to Dialogflow.
The problem is that Dialogflow accepts only messages and not richcontents from my API. ( not rendering, for example, chips).
Here is my code :
def answer_webhook():
message= {"fulfillment_response": {
"messages": [
{
"text": {
"text": "My text here"
}
}
],"richContent": [
[
{
"type": "description",
"title": "Description title",
"text": [
"This is text line 1.",
"This is text line 2."
]
}
]
]
}
}
return Response(json.dumps(message), 200, mimetype='application/json')
I tried different ways to write or construct the JSON, but nothing works
Could you please advise, knowing that I’m testing on an embedded Dialogflow Messenger UI
Thanks
Yassine