# How to implement a welcome message

**URL:** <https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282>\
**Category:** Rasa Open Source\
**Created:** [November 17, 2021, 9:30am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282 "2021-11-17T09:30:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 9:30am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/1 "2021-11-17T09:30:21Z")

</div>

Hi everyone, I’m trying to implement a welcome message with socket io implementation in my own website. I saw some topics but I get my code running with expected result. I wan’t to get a message from rasa bot when the user open the site and the bot, how can I do that?

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 9:34am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/2 "2021-11-17T09:34:13Z")

</div>

I’m using the official rasa script that s

```auto
<div id="rasa-chat-widget" data-websocket-url="https://your-rasa-url-here/"></div>

<script src="https://unpkg.com/@rasahq/rasa-chat" type="application/javascript"></script>

```

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 9:40am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/3 "2021-11-17T09:40:16Z")

</div>

Some extra code of my implementation my script

```auto
<div id="rasa-chat-widget" data-initial-payload="/get_started" data-websocket-url="https://your-rasa-url-here/"></div>
<script src="https://unpkg.com/@rasahq/rasa-chat" type="application/javascript"></script>

```

my domain.yml

```auto
utter_welcome_message:
  - text: Ciao

```

```auto
intents:
- get_started

```

my story

```auto
- story: welcome message
  steps:
  - intent: get_started
  - action: utter_welcome_message

```

---

<div class="post-metadata">

**Author:** ![bharath-madduri](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bharath-madduri/32/18010_2.png) [@bharath-madduri](https://forum.rasa.com/u/bharath-madduri)\
**Post date:** [November 17, 2021, 10:17am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/4 "2021-11-17T10:17:04Z")

</div>

Can you show us what is happening when you open the bot? It would be helpful if you can upload some logs.

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 10:27am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/5 "2021-11-17T10:27:23Z")

</div>

Hi, thanks for your time. When I open the bot nothing happens, it just show blank chat

---

<div class="post-metadata">

**Author:** ![bharath-madduri](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bharath-madduri/32/18010_2.png) [@bharath-madduri](https://forum.rasa.com/u/bharath-madduri)\
**Post date:** [November 17, 2021, 10:30am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/6 "2021-11-17T10:30:14Z")

</div>

what about the logs in rasa? do you see the intent getting triggered?

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 10:32am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/7 "2021-11-17T10:32:02Z")

</div>

how can I see if it was called? i have no log in the console

---

<div class="post-metadata">

**Author:** ![bharath-madduri](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bharath-madduri/32/18010_2.png) [@bharath-madduri](https://forum.rasa.com/u/bharath-madduri)\
**Post date:** [November 17, 2021, 10:35am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/8 "2021-11-17T10:35:03Z")

</div>

What command you are using to run rasa. You can use `rasa run -m models --enable-api --cors "*" --debug`

can see what’s happening with the flow. you just need to add `--debug` to your command.

In fact you can save the logs into a file if you run `rasa run -m models --enable-api --cors "*" --debug --log-file out.log`

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 10:35am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/9 "2021-11-17T10:35:34Z")

</div>

I’m using socket io in my own website, so I just have the widget in my page and I run the bot with rasa run actions & rasa run -m models --enable-api --cors “\*” in the terminal

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 10:35am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/10 "2021-11-17T10:35:49Z")

</div>

oh nice, let me try

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 10:38am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/11 "2021-11-17T10:38:47Z")

</div>

Opening the bot it shows just 2021-11-17 11:37:40 DEBUG rasa.core.channels.socketio - User XXX connected to socketIO endpoint. 2021-11-17 11:37:40 DEBUG rasa.core.channels.socketio - User XXX connected to socketIO endpoint.

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 10:47am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/13 "2021-11-17T10:47:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bharath-madduri](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bharath-madduri/32/18010_2.png) [@bharath-madduri](https://forum.rasa.com/u/bharath-madduri)\
**Post date:** [November 17, 2021, 10:54am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/14 "2021-11-17T10:54:26Z")

</div>

Let me also try with this widget. Meanwhile, you can use botfront rasa-webchat

> **[GitHub - botfront/rasa-webchat: A feature-rich chat widget for Rasa and Botfront](https://github.com/botfront/rasa-webchat)**
>
> A feature-rich chat widget for Rasa and Botfront. Contribute to botfront/rasa-webchat development by creating an account on GitHub.

```auto
<script>
        (function () {
            let e = document.createElement("script"),
                t = document.head || document.getElementsByTagName("head")[0];
            (e.src = "https://cdn.jsdelivr.net/npm/rasa-webchat@1.0.1/lib/index.js"),
                // Replace 1.x.x with the version that you want
                (e.async = !0),
                (e.onload = () => {
                    window.WebChat.default({
                        initPayload: '/get_started',
                        socketUrl: "http://127.0.0.1:5005/",
                        title: 'Title',
                        subtitle: 'An AI Assistant',
                        protocol: 'socketio',
                        customData: {
                            language: "en"
                        },
                        params: {
                            storage: "session"
                        },
                        // add other props here
                    });
                }),
                t.insertBefore(e, t.firstChild);
        })();
        WebChat.show();
    </script>

```

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 10:57am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/15 "2021-11-17T10:57:44Z")

</div>

I’m trying not to change widget and use the suggested by rasa official website to have a clean intallation. I also use jwt and I prefere not to change widget

---

<div class="post-metadata">

**Author:** ![bharath-madduri](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bharath-madduri/32/18010_2.png) [@bharath-madduri](https://forum.rasa.com/u/bharath-madduri)\
**Post date:** [November 17, 2021, 10:59am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/16 "2021-11-17T10:59:25Z")

</div>

Understood, as per the logs `data-initial-payload` is not hitting the rasa. will check and if I find any will get back to you

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 11:00am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/17 "2021-11-17T11:00:53Z")

</div>

Thank you a lot

---

<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:** [November 17, 2021, 12:50pm UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/18 "2021-11-17T12:50:45Z")

</div>

@ayoubelma What basically you mean by not to change the widget and suggested by rasa? Is that you developed your on frontend or you are using third party widget for rendering on website?

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 17, 2021, 12:56pm UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/19 "2021-11-17T12:56:02Z")

</div>

I’m using the script

```auto
<div id="rasa-chat-widget" data-websocket-url="https://your-rasa-url-here/"></div>
<script src="https://unpkg.com/@rasahq/rasa-chat" type="application/javascript"></script>

```

that is indicated in the rasa official site [Your Own Website](https://rasa.com/docs/rasa/connectors/your-own-website/) I need to use this and not third implementation

---

<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:** [November 17, 2021, 1:15pm UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/20 "2021-11-17T13:15:34Z")

</div>

@ayoubelma Right! Then you must be aware that some of the features are much depends on the frontend.

Can you confirm, what all features are your able to see in rasa official Webchat. like button, image, hyperlink, card carousal etc etc

Are you aware or the Rasa Webchat for the integration?

Please mention @ and alias of the person whom you are responsing please.

---

<div class="post-metadata">

**Author:** ![ayoubelma](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@ayoubelma](https://forum.rasa.com/u/ayoubelma)\
**Post date:** [November 18, 2021, 8:36am UTC](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282/21 "2021-11-18T08:36:27Z")

</div>

@nik202 At the moment I’m simply using a white html page with the script, I tried few weeks ago to show imgs and buttons and worked, I’m using jwt and it also works well. What do you mean with aware or the Rasa Webchat for the integration?

[Next page](https://forum.rasa.com/t/how-to-implement-a-welcome-message/49282.md?page=2)
