Is there way to get user email in slack

We integrate stackstorm with slack, and we are able to get the user name with action_context.api_user and assign the user name as the value of one action parameter. Is there a way to get user email address associated with this user? Thanks!

As far as I’m aware, there is not really a good way to do this with ChatOps. ChatOps is about conversation driven development, so ChatOps aliases are meant to post back into Slack if they need to communicate back to the user.

However, you can still get the user’s email address:

  1. Install the Slack pack
  2. Run a workflow action via the ChatOps alias
  3. Add a step in the workflow that searches Slack for the user with the username equal to {{ action_context.api_user }} and grabs the email address for that user

Thanks for your response, we will investigate the solution as you suggested!