How to change the layout of Replykeyboardmarkup/Quick Reply in api.ai for Telegram?

Asked

Viewed 126 times

0

ai for creating a bot, when using the service’s Quick reply the keyboard layout (Replykeyboardmarkup) in Telegram is vertical, thus cutting all messages:

inserir a descrição da imagem aqui

I saw that in the documentation dos Telegram bot there is the option for you to customize this layout. As this can be done in api.ai?

1 answer

1


I did, to do this I had to stop using Quick Reply and used the Custom Payload which allows you to inform the custom response json just like in the documentation of the platform you are using. As in my case Telegram has become so:

  "telegram": {
    "text": "Algumas coisa que posso fazer:",
    "reply_markup": {
      "resize_keyboard": true, "one_time_keyboard": true, 
      "keyboard": [
        ["abrir chamado"],
        ["buscar contracheque"],
        ["consultar avaliações"],
        ["o que mais você pode fazer?"]
        ]

    }
  },

Result was well what I expected:

inserir a descrição da imagem aqui

Here’s a hint for the next ones who experience this problem of having to customize the Telegram keyboard by api.ai.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.