# RasaX and Mysql integration

**URL:** <https://forum.rasa.com/t/rasax-and-mysql-integration/28331>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [May 2, 2020, 10:50pm UTC](https://forum.rasa.com/t/rasax-and-mysql-integration/28331 "2020-05-02T22:50:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![WeissWilly](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@WeissWilly](https://forum.rasa.com/u/WeissWilly)\
**Post date:** [May 2, 2020, 10:50pm UTC](https://forum.rasa.com/t/rasax-and-mysql-integration/28331/1 "2020-05-02T22:50:10Z")

</div>

Hello. Please forgive me but I have no other place to ask this question. I will like to create a Rasa chat-bot to tell me what I can cook with the ingredients that I have. I create an test database in MySQL in which I added two tables as fallows:

```
CREATE TABLE `Cake` (
  `Name:` varchar(255) NOT NULL,
  `Sugar` varchar(255) NOT NULL,
  `Milk` varchar(255) NOT NULL,
  `Eggs` varchar(255) NOT NULL,
  `Cacao` varchar(255) NOT NULL,
  `Flower` varchar(255) NOT NULL,
  UNIQUE KEY `Name:` (`Name:`),
  KEY `id` (`Name:`)
)

CREATE TABLE `Bread` (
  `Name:` varchar(255) NOT NULL,
  `Salt` varchar(255) NOT NULL,
  `Eggs` varchar(255) NOT NULL,
  `Flower` varchar(255) NOT NULL,
  UNIQUE KEY `Name:` (`Name:`),
  KEY `id` (`Name:`)
)

```

For now the Rasa X bot is giving me the greetings and ask me which ingredients I have. Can I use the bot to make a query into the database contain the column name in order to obtain the all the table names and to calculate the percentages??

Example:

If I will insert “Flower” for an example the bot should response that I have 25% ingredients to make Bread and 10 % ingredients to make a Cake.

Thank you for your support

---

<div class="post-metadata">

**Author:** ![lluchini](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lluchini/32/7609_2.png) [@lluchini](https://forum.rasa.com/u/lluchini)\
**Post date:** [May 3, 2020, 11:41pm UTC](https://forum.rasa.com/t/rasax-and-mysql-integration/28331/2 "2020-05-03T23:41:45Z")

</div>

Hello @WeissWilly,

welcome to the community!

If I understood correctly, the answer is yes.

You need to create a [custom action](https://rasa.com/docs/rasa/core/actions/#custom-actions) and the return of this custom action would be whatever you want after applying any logic/treatment you need.

Cya!

---

<div class="post-metadata">

**Author:** ![WeissWilly](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@WeissWilly](https://forum.rasa.com/u/WeissWilly)\
**Post date:** [May 4, 2020, 8:32am UTC](https://forum.rasa.com/t/rasax-and-mysql-integration/28331/3 "2020-05-04T08:32:02Z")

</div>

Thank you

---

<div class="post-metadata">

**Author:** ![lluchini](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lluchini/32/7609_2.png) [@lluchini](https://forum.rasa.com/u/lluchini)\
**Post date:** [May 4, 2020, 9:09am UTC](https://forum.rasa.com/t/rasax-and-mysql-integration/28331/4 "2020-05-04T09:09:42Z")

</div>

@WeissWilly

No problem, glad it helped you! 😃

Just mark the reply as solution to facilitate other to search answers (or topics to help).

Cya!
