# Custom Buttons from Custom Action

**URL:** <https://forum.rasa.com/t/custom-buttons-from-custom-action/13584>\
**Category:** Rasa Open Source\
**Created:** [July 26, 2019, 8:21am UTC](https://forum.rasa.com/t/custom-buttons-from-custom-action/13584 "2019-07-26T08:21:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikhilcss97](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilcss97/32/3954_2.png) [@nikhilcss97](https://forum.rasa.com/u/nikhilcss97)\
**Post date:** [July 26, 2019, 8:21am UTC](https://forum.rasa.com/t/custom-buttons-from-custom-action/13584/1 "2019-07-26T08:21:58Z")

</div>

Hi everyone, I want custom number of buttons with custom values(taken from a database) and want to set slots with the values of the buttons. I know we can do this as a template inside the domain.yml file as:

utter\_ask\_operation:

- buttons:
  - payload: ‘/choose{“operation”: “max”}’ title: Max
  - payload: ‘/choose{“operation”: “min”}’ title: Min
  - payload: ‘/choose{“operation”: “average”}’ title: Average
  - payload: ‘/choose{“operation”: “count”}’ title: Count
  - payload: ‘/choose{“operation”: “sum”}’ title: Sum text: what operation would you like?

where ‘operation’ is a slot.

How can we achieve the same using dispatcher.utter\_button\_message() inside my custom action?

---

<div class="post-metadata">

**Author:** ![nikhilcss97](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilcss97/32/3954_2.png) [@nikhilcss97](https://forum.rasa.com/u/nikhilcss97)\
**Post date:** [July 26, 2019, 9:31am UTC](https://forum.rasa.com/t/custom-buttons-from-custom-action/13584/2 "2019-07-26T09:31:36Z")

</div>

Anyone?

---

<div class="post-metadata">

**Author:** ![amn41](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amn41/32/20_2.png) [@amn41](https://forum.rasa.com/u/amn41)\
**Post date:** [July 29, 2019, 4:10pm UTC](https://forum.rasa.com/t/custom-buttons-from-custom-action/13584/3 "2019-07-29T16:10:28Z")

</div>

can you use this code here? [medicare\_locator/actions.py at master · RasaHQ/medicare\_locator · GitHub](https://github.com/RasaHQ/medicare_locator/blob/master/actions.py#L228)

---

<div class="post-metadata">

**Author:** ![nikhilcss97](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilcss97/32/3954_2.png) [@nikhilcss97](https://forum.rasa.com/u/nikhilcss97)\
**Post date:** [July 30, 2019, 5:12am UTC](https://forum.rasa.com/t/custom-buttons-from-custom-action/13584/4 "2019-07-30T05:12:04Z")

</div>

Hi @amn41 thanks a lot. My issue is solved.
