How to get logged-in slack username/user info

Hi Team, I’ve successfully connected slack with my rasabot and I’m able to talk to it in slack app too. Now, I have an action where slack needs to pass the slack username to rasa server and then that info can be used in custom actions. I need to know how will this be possible or rather what changes need to be done in the file to fetch user info from slack. Thanks. @nik202 please tell me if this is possible and how. Rasa OS - 2.8.15

@webdev-rohit you can save the logged-in information of slack (read the documentation of slack), store using tracker-store ( SQLite server or Postgress), and fetch the value by using custom action. I personally have not implemented this use case.

Okay @nik202 will check this and let you know. Also, if I find the solution I’ll post here

I’ve found the solution, the trick is to use slack’s api endpoint - For this, we need sender id which can be obtained by - tracker.sender_id. Then, pass this sender id in the above api endpoint and dispatch it in the custom actions as per your requirement.

@webdev-rohit any code for getting tracker.sender_id?

This line itself will get the senderid. So, you can store it in some variable like this- sender_id = tracker.sender_id Then, use this variable value in the api endpoint mentioned above