Google assistant rich response

Hello, I want to implement google rich response with rasa, Here is my ga_connector.py file whenever i use to send response, i got an exception def blueprint(self, on_new_message):

    google_webhook = Blueprint('google_webhook', __name__)

    @google_webhook.route("/", methods=['GET'])
    async def health(request):
        return response.json({"status": "ok"})

    @google_webhook.route("/webhook", methods=['POST'])
    async def receive(request):
        payload = request.json	
        intent = payload['inputs'][0]['intent'] 			
        text = payload['inputs'][0]['rawInputs'][0]['query'] 

        if intent == 'actions.intent.MAIN':	
            message = "Hello! Welcome to the Rasa-powered Google Assistant skill. You can start by saying hi."			 
        else:
            out = CollectingOutputChannel()			
            await on_new_message(UserMessage(text, out))
            responses = [m["text"] for m in out.messages]
            message = responses[0]
        r = {
              "expectUserResponse": 'true',
              "expectedInputs": [
                {
                  "possibleIntents": [
                    {
                      "intent": "actions.intent.TEXT"
                    }
                ],
                "inputPrompt": {
                  "richInitialPrompt": {
                    "items": [
                      {
                        "simpleResponse": {
                          "textToSpeech": message,
                          "displayText": message
                          }
                        }
                      ]
                    }
                  }
                }
              ]
            }

@SouvikGhosh can you help me in this problem please

What is the exception you’re getting?

@mloubser

res = { “payload”: { “google”: { “expectUserResponse”: True, “richResponse”: { “items”: [ { “simpleResponse”: { “textToSpeech”: “Here are list of deals” } }, { “carouselBrowse”: { “items”: [ { “title”: j[“title”], “openUrlAction”: { “url”: “Home - Big Bang }, “description”: j[“sub_title”], “footer”: j[“offer_description”], “image”: { “url”: “http://165.227.69.207:9001/{}”.format(imgurl), “accessibilityText”: response_offer_description } },

													]
												}
											}
										]
									}
								}
							}
						}
						dispatcher.utter_custom_json(res)
						print(res)

when i run this json, i got this response,

image