# How to write an intent which gets triggered regardless of the entity type extracted?

**URL:** <https://forum.rasa.com/t/how-to-write-an-intent-which-gets-triggered-regardless-of-the-entity-type-extracted/21320>\
**Category:** Rasa Open Source\
**Created:** [November 15, 2019, 6:24pm UTC](https://forum.rasa.com/t/how-to-write-an-intent-which-gets-triggered-regardless-of-the-entity-type-extracted/21320 "2019-11-15T18:24:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![checker20](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/checker20/32/6000_2.png) [@checker20](https://forum.rasa.com/u/checker20)\
**Post date:** [November 15, 2019, 6:24pm UTC](https://forum.rasa.com/t/how-to-write-an-intent-which-gets-triggered-regardless-of-the-entity-type-extracted/21320/1 "2019-11-15T18:24:12Z")

</div>

Hi I’m a new user,

I’m trying to write a simple bot that uses spacy pretrained embeddings and when it detects an entity, writes it to a file. For that purpose I’ve written a custom action, that gets triggered when the user writes a simple sentence (i.e John is an actor) My story looks like this

## write data

- write\_data\_action
  - action\_write\_data

and the NLU

## intent:write\_data\_action

- John
- John is a plumber

The problem is that the action never gets triggered unless I specify exactly in the story that a PERSON entity is expected like:

## write data{“PERSON”: “Jack”}

- write\_data\_action
  - action\_write\_data

I want an intent that gets triggered regardless of the entity or number of entities being recognized, and it will understand that this intent should be run due to the train data, and not due to the entity type (because I might have hundreds of entities and types and I would have to hundreds of entities that way)

Generally I’m trying to wrap my head around when should I write (intent){entity\_type: “value”} and plain (intent) in the stories.

Can someone help me? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![teresalazar13](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/teresalazar13/32/11081_2.png) [@teresalazar13](https://forum.rasa.com/u/teresalazar13)\
**Post date:** [March 27, 2020, 11:53am UTC](https://forum.rasa.com/t/how-to-write-an-intent-which-gets-triggered-regardless-of-the-entity-type-extracted/21320/2 "2020-03-27T11:53:03Z")

</div>

> [@checker20](#):
>
> ant an intent that gets triggered regardless of the entity or number of entities being recognized, and it will understand that this intent should be run due to the train data, and not due to the entity type (because I

Did you manage to do this? @checker20
