# How do i create buttons in rasa X?

**URL:** <https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [July 6, 2019, 6:37am UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570 "2019-07-06T06:37:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shiraz](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Shiraz](https://forum.rasa.com/u/Shiraz)\
**Post date:** [July 6, 2019, 6:37am UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/1 "2019-07-06T06:37:16Z")

</div>

So I tried putting this code in my domain.yml file but whenever i load rasa x and go to that path, it doesn’t seem to work.

domain.yml

```
Templates:
  utter_init:
  - text: Hi ! I am your friendly xyz AI chatbot. You can select from the options below or type on your own?
    buttons:
    - title: Happy
      payload: /mood_great
    - title: Sad
      payload: /mood_unhappy

```

Output:

 ![buttons](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/d/d6010e871bda825e353e627dbd6408b7492b1fd4.png)

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [July 6, 2019, 11:57am UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/2 "2019-07-06T11:57:06Z")

</div>

hey @Shiraz, can you try adding the value in the “title” fields of buttons in quotes, I mean this way:

> title : “Happy”

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 6, 2019, 12:05pm UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/3 "2019-07-06T12:05:52Z")

</div>

@JiteshGaikwad has a good point, put your payloads also in quotes. Do your buttons work in `rasa shell` but not in Rasa X?

---

<div class="post-metadata">

**Author:** ![Shiraz](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Shiraz](https://forum.rasa.com/u/Shiraz)\
**Post date:** [July 6, 2019, 1:17pm UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/4 "2019-07-06T13:17:21Z")

</div>

That didn’t help… when i use that command “rasa train” it edits my domain.yml file and removes those quotes

---

<div class="post-metadata">

**Author:** ![Shiraz](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Shiraz](https://forum.rasa.com/u/Shiraz)\
**Post date:** [July 6, 2019, 1:18pm UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/5 "2019-07-06T13:18:09Z")

</div>

Yes. They do work. I can use my arrow keys to make a choice. The problem still persists when i try the same thing in rasa x.

A quick hack that i found to get around the problem is to load an image before the buttons. The buttons then get displayed properly. But this can’t be a solution.

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 6, 2019, 7:05pm UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/6 "2019-07-06T19:05:46Z")

</div>

That’s quite strange. What version of Rasa X is it? We just released a new one yesterday, could you try updating to 0.19.3 and see if the problem persists?

---

<div class="post-metadata">

**Author:** ![erbo](https://avatars.discourse-cdn.com/v4/letter/e/3da27b/32.png) [@erbo](https://forum.rasa.com/u/erbo)\
**Post date:** [July 18, 2019, 12:58pm UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/7 "2019-07-18T12:58:07Z")

</div>

I have the same issue, buttons are not displayed in rasa-x, while in rasa shell everything’s working as expected (I can move with arrows and chose an option).

The same happens with images, I don’t see them in rasa-x but I see at least a text with “Attachment: /path/to/my/image” in the console. Are images supported in rasa-x?

I’m using the latest version of rasa-x (0.19.5)

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 18, 2019, 1:18pm UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/8 "2019-07-18T13:18:20Z")

</div>

Hey guys. Just tested on 0.19.5, I don’t have any issues with buttons or images.

 ![46](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/d/de5d3b5608b59e1874e2f14cefd4286d0bddce30.png) ![58](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/0/04aa59ff9dc79d3a60db5063fe54ce687d55d457.jpeg)

> I see at least a text with “Attachment: /path/to/my/image” in the console. Are images supported in rasa-x?

Are you using `image:` or `attachment:` in your domain file?

---

<div class="post-metadata">

**Author:** ![erbo](https://avatars.discourse-cdn.com/v4/letter/e/3da27b/32.png) [@erbo](https://forum.rasa.com/u/erbo)\
**Post date:** [July 18, 2019, 1:25pm UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/9 "2019-07-18T13:25:07Z")

</div>

Thanks for your answer, I was about to write that after upgrading also rasa to 1.1.6 I could see buttons too. I had an older version of rasa and latest version of rasa-x and that probably caused the issue with buttons.

About images, in my use case, I’m using `dispatcher.utter_attachment(f"/path/to/my/image.jpeg")` inside a custom form and I can’t see it in rasa-x.

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [July 18, 2019, 1:30pm UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/10 "2019-07-18T13:30:16Z")

</div>

Yes indeed, `attachment` could be anything, which is why it doesn’t auto-render as an image. I’m afraid that I don’t think there is currently a way to get images from custom actions rendering in rasa X. However there was just recently a PR to add a `utter_image_url` method to the dispatcher class [here](https://github.com/RasaHQ/rasa-sdk/pull/88) – once that version of SDK is released, I believe images dispatched using that method would render in rasa X.

---

<div class="post-metadata">

**Author:** ![erbo](https://avatars.discourse-cdn.com/v4/letter/e/3da27b/32.png) [@erbo](https://forum.rasa.com/u/erbo)\
**Post date:** [July 18, 2019, 1:51pm UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/11 "2019-07-18T13:51:36Z")

</div>

That’s nice! I will give it a try whenever there will be a new release, thanks!

---

<div class="post-metadata">

**Author:** ![Kushala](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@Kushala](https://forum.rasa.com/u/Kushala)\
**Post date:** [April 19, 2022, 10:27am UTC](https://forum.rasa.com/t/how-do-i-create-buttons-in-rasa-x/12570/12 "2022-04-19T10:27:33Z")

</div>

[erohmensing](http://forum.rasa.com/u/erohmensing) Does Buttons works fine with Rasa? or Do i need to install Rasa X
