# Utter\_button\_message on basic rasa example not working

**URL:** <https://forum.rasa.com/t/utter-button-message-on-basic-rasa-example-not-working/21689>\
**Category:** Rasa Open Source\
**Created:** [November 25, 2019, 3:28pm UTC](https://forum.rasa.com/t/utter-button-message-on-basic-rasa-example-not-working/21689 "2019-11-25T15:28:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jestershoeman](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jestershoeman](https://forum.rasa.com/u/jestershoeman)\
**Post date:** [November 25, 2019, 3:28pm UTC](https://forum.rasa.com/t/utter-button-message-on-basic-rasa-example-not-working/21689/1 "2019-11-25T15:28:48Z")

</div>

Hi there,

I’ve been trying to use dispatcher.utter\_button\_message in a project of mine and I couldn’t quite figure it out. So I tried it on the basic rasa example (rasa init) and it still didn’t work. Maybe someone can figure out what I’m doing wrong here.

1. I used rasa init to create a new project.

2. I added a custom action “action\_button”

3. I have the action triggered by the greet intent:

intents:

- greet: triggers: action\_button

1. I added the action to my stories:

## happy path

- greet
  - action\_button
  - utter\_greet

- mood\_great
  - utter\_happy

I know the action is being triggered (printing), but the buttons do not appear - I’m using “rasa shell” to test my bot.

Hope someone can help me out with this.

Thank you!

---

<div class="post-metadata">

**Author:** ![durashi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/durashi/32/6143_2.png) [@durashi](https://forum.rasa.com/u/durashi)\
**Post date:** [November 26, 2019, 7:45am UTC](https://forum.rasa.com/t/utter-button-message-on-basic-rasa-example-not-working/21689/2 "2019-11-26T07:45:49Z")

</div>

> [@jestershoeman](#):
>
> class ActionHelloWorld(Action):
> 
> def name(self): return “action\_button”
> 
> def run(self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]):
> 
> ```auto
> buttons = [{"title": "Button 1", "payload": "/goodbye"},
> {"title": "Button 2", "payload": "/goodbye"}]
> dispatcher.utter_button_message("Here are two buttons:", buttons)
> 
> return []
> 
> ```

I have tried your action in my action file and it worked totally fine. I have faced same kind of issue when using formaction. Check this out

> [@Button message not displayed during FormAction](http://forum.rasa.com/t/button-message-not-displayed-during-formaction/13596):
>
> Hi, i try to validate a slot for which multiple entity inputs where found in a single message. In that case the variable ‘value’ in validate\_{slot\_to\_validate} is a list of the extracted entities. My idea was to let the user choose which entity he wants to map to the slot via a button message. Therefore I wrote this functions within my FormAction which gets called in the validate\_{slot} function # result\_list here contains the possible slot values def \_ambiguous\_result(self,dispatcher,tracke…

But with custom actions it did not cause any issues so far. May be you should try restart action server again using `rasa run actions --actions actions` command and you can also refer the logs to find out what is happening inside. In case if you need to get the log file use ` rasa shell --log-file out.log --debug`.

---

<div class="post-metadata">

**Author:** ![jestershoeman](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jestershoeman](https://forum.rasa.com/u/jestershoeman)\
**Post date:** [November 26, 2019, 1:30pm UTC](https://forum.rasa.com/t/utter-button-message-on-basic-rasa-example-not-working/21689/3 "2019-11-26T13:30:48Z")

</div>

Hi Durashi,

thanks for your reply.

If my action worked for you, then I’ll definitely have to check my logs. Thanks for checking it out.

Best, Deniz

---

<div class="post-metadata">

**Author:** ![durashi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/durashi/32/6143_2.png) [@durashi](https://forum.rasa.com/u/durashi)\
**Post date:** [November 26, 2019, 1:58pm UTC](https://forum.rasa.com/t/utter-button-message-on-basic-rasa-example-not-working/21689/4 "2019-11-26T13:58:56Z")

</div>

Happy to help, deniz 🙂
