# Is there a way to get the bot to start the conversation rather than waiting for the user to enter input?

**URL:** <https://forum.rasa.com/t/is-there-a-way-to-get-the-bot-to-start-the-conversation-rather-than-waiting-for-the-user-to-enter-input/22871>\
**Category:** Getting Started with Rasa\
**Created:** [December 29, 2019, 3:48am UTC](https://forum.rasa.com/t/is-there-a-way-to-get-the-bot-to-start-the-conversation-rather-than-waiting-for-the-user-to-enter-input/22871 "2019-12-29T03:48:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jmg007](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@Jmg007](https://forum.rasa.com/u/Jmg007)\
**Post date:** [December 29, 2019, 3:48am UTC](https://forum.rasa.com/t/is-there-a-way-to-get-the-bot-to-start-the-conversation-rather-than-waiting-for-the-user-to-enter-input/22871/1 "2019-12-29T03:48:55Z")

</div>

Hi. With all the Rasa stories in the examples (incl in the videos) the intents require the user to start the conversation eg.“Hi” with a greet intent.

Is there a way to get the bot to utter something first when Rasa shell first loads up?

Thanks.

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [January 2, 2020, 9:09am UTC](https://forum.rasa.com/t/is-there-a-way-to-get-the-bot-to-start-the-conversation-rather-than-waiting-for-the-user-to-enter-input/22871/2 "2020-01-02T09:09:01Z")

</div>

@Jmg007 On start the `SessionStart` Event (see [Events](https://rasa.com/docs/rasa/api/events/#start-a-new-conversation-session)) is executed. It calls the `ActionSessionStart`. You can customize this action (see [Rasa SDK](https://rasa.com/docs/rasa/api/rasa-sdk/#customising-the-session-start-action)) to utter something when the bot starts.

---

<div class="post-metadata">

**Author:** ![\_sanjay\_r](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/_sanjay_r/32/4451_2.png) [@\_sanjay\_r](https://forum.rasa.com/u/_sanjay_r)\
**Post date:** [April 14, 2020, 7:26pm UTC](https://forum.rasa.com/t/is-there-a-way-to-get-the-bot-to-start-the-conversation-rather-than-waiting-for-the-user-to-enter-input/22871/3 "2020-04-14T19:26:29Z")

</div>

Hi @Tanja ,

I was also trying to get this to work. Do you have a working example for this?

I tried this on telegram , but dosn’t work.

Do you have a working example for this? Below is my actions.py file. I have added the `class ActionSessionStart.` I have also included `- action_session_start` in my domain.yml

```
from typing import Any, Text, Dict, List
    from rasa_sdk import Action, Tracker
    from rasa_sdk.executor import CollectingDispatcher
    from rasa_sdk.forms import FormAction
    from rasa_sdk.events import SlotSet, SessionStarted, ActionExecuted, EventType

class ActionSessionStart(Action):
def name(self) -> Text:
    return "action_session_start" # This name function returns the name of the custom action.Here is is action_session_start

@staticmethod
def fetch_slots(tracker: Tracker) -> List[EventType]:
    """Collect slots that contain the user's name and phone number."""

    slots = []

    for key in ("name", "email", "pincode", "mobnumber"):
        value = tracker.get_slot(key)
        if value is not None: # this is how to check if slot value is filled or not.
            slots.append(SlotSet(key=key, value=value))

    return slots

def apply_to(self, tracker: "DialogueStateTracker") -> None:
    # noinspection PyProtectedMember
    tracker._reset()
    
async def run(
        self,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any],
) -> List[EventType]:

    # the session should begin with a `session_started` event
    events = [SessionStarted()]
    #
    # # any slots that should be carried over should come after the
    # # `session_started` event
    # events.extend(self.fetch_slots(tracker))
    #
    # # an `action_listen` should be added at the end as a user message follows
    dispatcher.utter_message(template="utter_greet_ask")
    events.append(ActionExecuted("action_listen"))
    #

    return events

```

But Still it dosn’t seem to start the conversation with` utter_ask_greet`

I ran the command `rasa run actions -p 5002` in one terminal and `rasa run` in another.

Using ngrok to connect to telegram.( ngrok is running in port 5005, so earlier I got error as action server can’t be started.) All telegram configutations are done and set up the bot in telegram as well.

Here are my logs…

1. 

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/6/697b5d07e425e19db5b024d98aefd62b8596a543.png)

1. 

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/6/65ba334b0feb2013f81e84b5261e8016c13000ca.png)

I can’t seem to figure it out…Could you please help 🙂?

Hey @Jmg007 , did you get it to work ??

---

<div class="post-metadata">

**Author:** ![\_sanjay\_r](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/_sanjay_r/32/4451_2.png) [@\_sanjay\_r](https://forum.rasa.com/u/_sanjay_r)\
**Post date:** [April 15, 2020, 7:34am UTC](https://forum.rasa.com/t/is-there-a-way-to-get-the-bot-to-start-the-conversation-rather-than-waiting-for-the-user-to-enter-input/22871/4 "2020-04-15T07:34:49Z")

</div>

I realized the above issue is actually a feature of Rasa [Here](http://forum.rasa.com/t/chatroom-let-the-bot-start-the-conversation/2738/14).

I couldn’t really figure out how to implement it .

Guess it’s the default behaviour Rasa had in place taking security into consideration.🙂

Works fine now.
