4

I'm working on a chatbot for Slack in AWS Lex, and I need it to collect an email address. While testing in Lex, it works fine because any email address remains as a string. But when it's hooked up to Slack, email address gets converted to mailto:youremail@domain.com format, so Lex fails to recognize it as a valid email address.

Is there any workaround to disable this functionality in Slack?

Adil B
  • 14,635
  • 11
  • 60
  • 78
LeftyT
  • 512
  • 6
  • 12

2 Answers2

1

You can either do the pre-processing of the text received and extract the email address before passing it onto Lex.

Or if you are using Slack api's for sending messages then you can try to set the parse=none to disable the message formatting done by Slack. Message Formatting Api.

sid8491
  • 6,622
  • 6
  • 38
  • 64
0

You will probably need to write a function to extract the email address from the returned Slack message - check out errbot's sanitize_uris function, which does exactly this.

A similar question

Adil B
  • 14,635
  • 11
  • 60
  • 78