Slack does not recognise email address as an entity

I want to take email address as input from user. I have tested this feature on rasa shell mode but when i try this in slack it does not work as expected.

here is the chunk of debugging where i take email address as input from user:

My observation is that when i input email address in slack so it detects it as ‘mailto:zainrajani93@gmail.com|zainrajani93@gmail.com’ but in shell mode it just picks the raw text. I can’t resolve this issue in slack. I have searched for the documentation on slack website and tried to change slack.py function as per the documentation:

async def send_text_message(
    self, recipient_id: Text, text: Text, **kwargs: Any
) -> None:
    recipient = self.slack_channel or recipient_id
    for message_part in text.split("\n\n"):
        super(SlackBot, self).api_call(
            "chat.postMessage",
            channel=recipient,
            as_user=True,
            text=message_part,
            type="mrkdwn",
        )

to

async def send_text_message(
    self, recipient_id: Text, text: Text, **kwargs: Any
) -> None:
    recipient = self.slack_channel or recipient_id
    for message_part in text.split("\n\n"):
        super(SlackBot, self).api_call(
            "chat.postMessage",
            channel=recipient,
            as_user=True,
            text=message_part,
            type="plain_text"
        )

still the problem is not resolved

I just need to figure out a way to detect input text as raw text without any formatting in slack

Need help on this issue asap

How are you extracting the email when using shell? Maybe you extend it with a regex that covers MD as well as plaintext

I didn’t change anything in shell mode, its the same way. Slack recognizes it as email address and formats it as mailto:email|email, while shell mode parses the raw text.

Can you elaborate on regex part?

I mean this, you can use regular expressions to help the entity extractor. Basically you can add something like (?:mailto:(?:\w+@\w+\.\w+)\|)?(?:\w+@\w+\.\w+) to you training data which would match both mail@something.com as well as mailto:mail@something.com|mail@something.com. (This is probably not the perfect regex for the job but you get the idea).