# If user input is not matching any intents, then get the input in action and process it

**URL:** <https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909>\
**Category:** Rasa Open Source\
**Created:** [January 26, 2022, 6:35pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909 "2022-01-26T18:35:31Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![shamim237](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shamim237/32/19140_2.png) [@shamim237](https://forum.rasa.com/u/shamim237)\
**Post date:** [January 26, 2022, 6:35pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/1 "2022-01-26T18:35:31Z")

</div>

Hello,

I want to build a bot that can redirect a link from google if the user input is not defined in the intent list.

But, I don’t know how to use actions.py to process this. How can I get the user input and check if it is matching to any intent or not?

Can anyone help me?

---

<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:** [January 26, 2022, 6:43pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/2 "2022-01-26T18:43:07Z")

</div>

@shamim237 hello and welcome to the forum!!

Can you share an example of a bot/user conversation?

---

<div class="post-metadata">

**Author:** ![shamim237](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shamim237/32/19140_2.png) [@shamim237](https://forum.rasa.com/u/shamim237)\
**Post date:** [January 26, 2022, 7:03pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/3 "2022-01-26T19:03:05Z")

</div>

bot- hi user- hi bot- welcome user- machine (not in intent list)

if user’s message not in the intent list, i want to get this message and search the message in google, then processing it

---

<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:** [January 26, 2022, 7:26pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/4 "2022-01-26T19:26:50Z")

</div>

@shamim237 Means you want this scenario.

Bot: Hello welcome! How can I assist you?

User: Please tell me the latest version or Rasa X

Bot: Rasa X latest version is 1.0.x

these user queries should have in the intents examples.

But, if user asked :

User: Tell me the Window OS latest version

Which is not the part of intent’s it will go to google, search this user query and reply the answer? Right?

---

<div class="post-metadata">

**Author:** ![shamim237](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shamim237/32/19140_2.png) [@shamim237](https://forum.rasa.com/u/shamim237)\
**Post date:** [January 26, 2022, 7:28pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/5 "2022-01-26T19:28:04Z")

</div>

exactly! Right

---

<div class="post-metadata">

**Author:** ![shamim237](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shamim237/32/19140_2.png) [@shamim237](https://forum.rasa.com/u/shamim237)\
**Post date:** [January 26, 2022, 7:30pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/7 "2022-01-26T19:30:13Z")

</div>

I can get the search result from google only if the user input is already in the intent. Besides this, I can’t. 😔

---

<div class="post-metadata">

**Author:** ![shamim237](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shamim237/32/19140_2.png) [@shamim237](https://forum.rasa.com/u/shamim237)\
**Post date:** [January 26, 2022, 7:31pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/8 "2022-01-26T19:31:36Z")

</div>

please enlighten me. I will really appreciate that.

---

<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:** [January 26, 2022, 7:31pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/9 "2022-01-26T19:31:55Z")

</div>

@shamim237 Yes, because rasa is trained based on the training examples only.

@shamim237 as you have already gotten the result, means you have tried all the suggestions which I was trying to suggest 😛 smart you.

@shamim237 You are basically building the search engine, not the chatbot, I am afraid.

Let me think about this use case and lets see how other developers comment on this use case.

---

<div class="post-metadata">

**Author:** ![shamim237](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shamim237/32/19140_2.png) [@shamim237](https://forum.rasa.com/u/shamim237)\
**Post date:** [January 26, 2022, 7:35pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/10 "2022-01-26T19:35:04Z")

</div>

not really. Our training dataset is always limited. I just want to make this chatbot, if it can fetch some data, which are not in the intent.md file.

---

<div class="post-metadata">

**Author:** ![shamim237](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shamim237/32/19140_2.png) [@shamim237](https://forum.rasa.com/u/shamim237)\
**Post date:** [January 26, 2022, 7:39pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/11 "2022-01-26T19:39:24Z")

</div>

In the real scenario, it is simple. We don’t know all the things in the world, but whenever it comes to learn, we google it. Likely, the bot has limited intents, so, when it gets any unknown input from the user, it will check the input and try to match with the intent list. If it can’t find any matching intent, it will google it. isn’t it simple? But I don’t know rasa well enough. I am using rasa for about 2-3 days.

---

<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:** [January 26, 2022, 8:09pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/12 "2022-01-26T20:09:35Z")

</div>

> [@shamim237](#):
>
> intent.md

@shamim237 share me rasa --version please?

---

<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:** [January 26, 2022, 8:11pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/13 "2022-01-26T20:11:51Z")

</div>

@shamim237 but here the things do not go as per the real scenario, a model needs to be trained based on intents and some sets of examples.

@shamim237 I’d recommend please see some resources.

Valuable links and resources for your reference

1. [RasaMasterclass](https://www.youtube.com/playlist?list=PL75e0qA87dlHQny7z43NduZHPo6qd-cRc)
2. [Conversational AI with Rasa - Video Series [Latest based on 2.x]](https://www.youtube.com/playlist?list=PL75e0qA87dlEjGAc9j9v3a5h1mxI2Z9fi)
3. [Rasa for Beginners](https://www.udemy.com/course/rasa-for-beginners/)
4. [Rasa Certification Workshop](https://www.udemy.com/course/rasa-certification-workshop/)
5. [Rasa Advanced Custom Actions, Forms, & Responses Workshop](https://www.udemy.com/course/rasa-advanced-custom-actions-forms-responses-workshop/) No-longer accepting enrolment
6. [Rasa Advanced Deployment Workshop](https://www.udemy.com/course/rasa-advanced-deployment-workshop/)
7. [Rasa Youtube Channel](https://www.youtube.com/channel/UCJ0V6493mLvqdiVwOKWBODQ) Please subscribe and hit the bell icon for notification.
8. [Rasa Github Mini Project](https://github.com/RasaHQ/rasa/tree/main/examples)
9. [Rasa Masterclass Handbook](https://info.rasa.com/masterclass-ebook)
10. [Hardcopy Book: Conversational AI with Rasa](https://www.packtpub.com/product/conversational-ai-with-rasa/9781801077057)

I hope these links will help you to learn Rasa!

---

<div class="post-metadata">

**Author:** ![shamim237](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shamim237/32/19140_2.png) [@shamim237](https://forum.rasa.com/u/shamim237)\
**Post date:** [January 26, 2022, 8:15pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/14 "2022-01-26T20:15:28Z")

</div>

Just tell me one thing, is there any way to map your stories.md file without giving an intent first? Like– story

- steps

—custom\_action

---

<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:** [January 26, 2022, 8:25pm UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/15 "2022-01-26T20:25:34Z")

</div>

answer is no

```auto
- story: welcome path1
    steps:
      - intent: get_started
      - action: utter_welcome_message
      - action: action_custom_actions

```

---

<div class="post-metadata">

**Author:** ![anshal](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@anshal](https://forum.rasa.com/u/anshal)\
**Post date:** [June 20, 2022, 8:28am UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/16 "2022-06-20T08:28:23Z")

</div>

HIi @nik202 i wanted to know the same i just want to take an input and then without matching the intent i want to pass it in actions how can i do that

---

<div class="post-metadata">

**Author:** ![Msameim181](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/msameim181/32/22337_2.png) [@Msameim181](https://forum.rasa.com/u/Msameim181)\
**Post date:** [February 16, 2023, 8:23am UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/17 "2023-02-16T08:23:15Z")

</div>

> [@anshal](#):
>
> same i just want to take an input and then with

Same Question.

---

<div class="post-metadata">

**Author:** ![xxxwarrior](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/xxxwarrior/32/22147_2.png) [@xxxwarrior](https://forum.rasa.com/u/xxxwarrior)\
**Post date:** [June 22, 2023, 10:51am UTC](https://forum.rasa.com/t/if-user-input-is-not-matching-any-intents-then-get-the-input-in-action-and-process-it/50909/18 "2023-06-22T10:51:30Z")

</div>

I’m just going through forum themes and can not find information about how to use ANY user input.

For example, in my use case bot asks for additional commentaries which I just want to save. But it’s impossible to write intents for such use case, they will always fail. It’s ridiculous if it’s impossible to somehow take any input from user.
