i'm new to slack programing so bear with me. In my company we have slack bot that users can use to alert other users, by posting an alert in one slack channel relevant user will get alerted in other channel. The problem is that user that was alerted don't know from which channel or thread the alert originated and have to manually search multiple channels. The question is how can i accomplish this so that the user will get alerted and in addition get link to channel or thread where the alert was triggered from.
It depends on how users trigger alters, but you'll usually get a Channel ID in the payload from Slack.
When you're alerting the other users, if you include that channel ID in the message, but wrap it <#[channelid]>
e.g. <#CHJ9HDXE1>
, then the Slack clients will convert that into a link to the channel, or you could also use chat.getPermalink to convert a message_ts into a clickable link.