# How to Add Welcome message in RASA X?

**URL:** <https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [August 11, 2021, 7:47am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754 "2021-08-11T07:47:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smit](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Smit](https://forum.rasa.com/u/Smit)\
**Post date:** [August 11, 2021, 7:47am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/1 "2021-08-11T07:47:45Z")

</div>

Hello @nik202, Do you know how to add a welcome message from bot-like “Hey there, I am a bot. How Can I assist you?”

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [August 11, 2021, 9:08am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/2 "2021-08-11T09:08:59Z")

</div>

Hello,

You will need to implement that in your frontend:

You will surely have a `send(message)` function to send the user messages via API. On start of your application, you will just need to automatically send a hidden message or payload as if it’s from the user, which will trigger the action.

For example, if `utter_greet` is the answer to the intent `greet`, you could execute `send("Hello")` or `send("/greet")` on startup.

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [August 11, 2021, 9:28am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/3 "2021-08-11T09:28:50Z")

</div>

@Smit Heya! Can I ask have you decided any frontend for your bot, I mean GUI or you planning that whilst using Rasa-X?

---

<div class="post-metadata">

**Author:** ![Smit](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Smit](https://forum.rasa.com/u/Smit)\
**Post date:** [August 11, 2021, 9:39am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/4 "2021-08-11T09:39:27Z")

</div>

@ChrisRahme Thank you for replying. But I couldn’t understand what you are trying to say. It would be better if you can explain with example.

---

<div class="post-metadata">

**Author:** ![Smit](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Smit](https://forum.rasa.com/u/Smit)\
**Post date:** [August 11, 2021, 9:42am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/5 "2021-08-11T09:42:59Z")

</div>

Hey @nik202, RIght now I am testing my bot in Rasa X UI only. And as of now, I have not decided on which platform I will deploy it.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/c/2/c267ab95b1b89ae3a30996cb3aa676243befa50e.png)

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [August 11, 2021, 9:49am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/6 "2021-08-11T09:49:24Z")

</div>

@Smit Right, because there is no clear solution what your use case required i.e bot should greet the user with the welcome message. You can follow Chris advice or as you asked for some example, I guess he will share.

If you plan for other alternative for GUI, I would love to provide more help for your project.

---

<div class="post-metadata">

**Author:** ![Smit](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Smit](https://forum.rasa.com/u/Smit)\
**Post date:** [August 11, 2021, 9:55am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/7 "2021-08-11T09:55:10Z")

</div>

@nik202 Yup, Let’s see what Chris will reply, after that we will go ahead.

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [August 11, 2021, 9:56am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/8 "2021-08-11T09:56:56Z")

</div>

@Smit 🤝 deal

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [August 11, 2021, 11:21am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/9 "2021-08-11T11:21:31Z")

</div>

Fontend means the interface the user will use to talk the the bot, like a web widget or a mobile application.

You can’t start with a message from the bot in Rasa X; you will have to do that in your application. There are two ways:

1. In that application, you will have a `send()` function for sure, to send the user message to the Rasa server when the user clicks on the “send” button.

2. You will also have a `display_message()` function which you will use to display the message received by the bot.

There are multiple frontends you can use:

- [Chatbot Widget](https://github.com/JiteshGaikwad/Chatbot-Widget) by Jitesh Gaikwad (web)
- [WebApp](https://github.com/ChrisRahme/fyp-webapp) by me (web)
- [Webchat](https://github.com/botfront/rasa-webchat) by Botfront (web)
- [Chatroom](https://github.com/scalableminds/chatroom) by ScalableMinds (web)
- [Rasa Android](https://github.com/Horizon733/Rasa-with-Android-app/tree/part4) by Dishant Ghandi (mobile)
- [MobApp](https://github.com/ChrisRahme/fyp-mobapp) by me (mobile)

All of them have a feature to do what mentioned above, except the Rasa Android app (I think).

* * *

A small JavaScript code example for solution 1:

```javascript
$(document).ready(() => {
  send("Hello")
})

function send(message) {
  $.ajax({
    url: rasa_server_url,
    type: "POST",
    contentType: "application/json",
    data: JSON.stringify({ message, sender: sender_id }),
    success(botResponse, status) {
      setBotResponse(botResponse);
    },
    error(xhr, textStatus) {
      setBotResponse('Error');
    },
  });
}

```

And for solution 2:

```javascript
$(document).ready(() => {
  display_message("Hey there, I am a bot. How can I assist you?")
})

function display_message(message) {
  $(`<p class="botMsg">${message}</p>`).appendTo(".chats").hide().fadeIn(500);
}

```

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [August 11, 2021, 11:33am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/10 "2021-08-11T11:33:45Z")

</div>

@ChrisRahme 🤩🤩🤩🤩🤩🤩

---

<div class="post-metadata">

**Author:** ![Smit](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Smit](https://forum.rasa.com/u/Smit)\
**Post date:** [August 12, 2021, 9:42am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/11 "2021-08-12T09:42:53Z")

</div>

Thank you so much @ChrisRahme. We tried your Solution 1 and it’s working perfectly 🤩.

And Nik202 You’re are right we tried the @ChrisRahme solution, but for that, we need one basic UI so we tried \* [Chatbot Widget](https://github.com/JiteshGaikwad/Chatbot-Widget) by Jitesh Gaikwad (web). Look I’ve attached a screenshot.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/e/2/e228657f11b2e2cd8b4e19556252011f9f8abdb3.jpeg)

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [August 12, 2021, 9:48am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/12 "2021-08-12T09:48:48Z")

</div>

@Smit I told you, but you did a cheating 😛 you suppose to use Rasa-X and you used alternative instead, which I also proposed. But, I am happy that you solved your issue 👏👏. If you got any GUI issue do let me know 😉 or to Chris.

---

<div class="post-metadata">

**Author:** ![Smit](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Smit](https://forum.rasa.com/u/Smit)\
**Post date:** [August 12, 2021, 10:19am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/13 "2021-08-12T10:19:05Z")

</div>

@nik202 Oops, sorry I broke the deal 🙈 😛,

But we also tried in Rasa X but we can’t call and customize the inbuilt function of Rasa X such as action\_restart. That’s why we did it this way.

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [August 12, 2021, 11:03am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/14 "2021-08-12T11:03:51Z")

</div>

Glad to be of help 🙂

---

<div class="post-metadata">

**Author:** ![lucas144](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lucas144/32/20432_2.png) [@lucas144](https://forum.rasa.com/u/lucas144)\
**Post date:** [April 29, 2022, 3:10pm UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/15 "2022-04-29T15:10:18Z")

</div>

Are these widgets still working with Rasa 3.x?

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [May 2, 2022, 3:26pm UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/16 "2022-05-02T15:26:43Z")

</div>

@lucas144you can try botfront

---

<div class="post-metadata">

**Author:** ![lucas144](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lucas144/32/20432_2.png) [@lucas144](https://forum.rasa.com/u/lucas144)\
**Post date:** [May 2, 2022, 4:02pm UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/17 "2022-05-02T16:02:20Z")

</div>

Okay @nik202. I will check it out. I tried with " \* [Chatbot Widget](https://github.com/JiteshGaikwad/Chatbot-Widget) by Jitesh Gaikwad (web)" but it was not working anymore with Rasa 3.1

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [May 3, 2022, 9:11am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/18 "2022-05-03T09:11:27Z")

</div>

@lucas144 sure give it a try, it always works for me with 2.x and 3.x in past, but there can be some sanic version issue, that you can easily find on the forum.

---

<div class="post-metadata">

**Author:** ![lucas144](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lucas144/32/20432_2.png) [@lucas144](https://forum.rasa.com/u/lucas144)\
**Post date:** [May 3, 2022, 9:12am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/19 "2022-05-03T09:12:56Z")

</div>

Sounds good @nik202. Thanks!

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [May 3, 2022, 9:13am UTC](https://forum.rasa.com/t/how-to-add-welcome-message-in-rasa-x/46754/20 "2022-05-03T09:13:44Z")

</div>

@lucas144 no worries.
