How to trigger an intent within custom action

Hi, I want to trigger an intent from a custom action. I have a logic that decides which intent it has to be triggered. I know how stories work but this is a special case (a custom fallback).

I already tried to use UserUttered without success

        closest_intent = tracker.get_slot("closest_intent")
        data = {
                    "intent": {
                        "name": "eres_bot",
                        "confidence": 1.0,
                    }
         }
        return [UserUttered(
            text="/{}".format(closest_intent),
            parse_data=data,
        )]

Also, I tried to use the HTTP API to trigger an intent and it didn’t work.

How can I achieve this?

Did you try UserUttered with Rules?

I didn’t know that. Can you give me please an example of how UserUttered works with rules