1

This is the first question I ask in quite a few years :-)

I've gotten to play around with the Slack API recently to write up some notification bot. As part of the bot workflow, I want it to send messages to a channel, where it will create a thread based on the initial message.

This is done already, by using the chat.postMessage verb and thread_ts attributes. However, messages to threads that an user is not involved or subscribed to will not send any notifications.

My question, is it possible to have a a bot subscribe you to a thread? This is explained in this Slack KB post, where you can manually sign in to notifications using the three dotted menu, or by pinging the user.

My initial idea is based on the Block Kit interface, where clicking a button would subscribe you to the channel, providing more visibility than the three dotted menu approach. Is this something feasible?

I haven't found any reference to this on the Slack API method Reference, but perhaps it's hidden somewhere else.

As a fallback mechanism, I will think on editing the original message with a list of "subscribers" so that they will notified of updates to the thread.

Alxe
  • 381
  • 3
  • 12

1 Answers1

1


As you already mentioned, there is no publicly available API to subscribe to thread notifications.
I'll recommend dropping a message to Slack Support to ask about any private API.

Internally for their client, they use following APIs:

https://{{domain}}.slack.com/api/subscriptions.thread.add
https://{{domain}}.slack.com/api/subscriptions.thread.remove

I am curious about your fallback mechanism.
Do you intend to tag relevant parties in the original message?
You can try to tag them in a reply to the original message, this way the original message remains tidy.

Suyash Gaur
  • 2,481
  • 2
  • 9
  • 22
  • Thank you for your reply! There are not many intended users, so my initial thought was of modifying the initial message, but if things scale in terms of users, I can "book" a message to ping users who "subscribe". One limitation of this approach is that it mimics the `subscriptions.thread.add`, but there's not analogous for `subscriptions.thread.remove` as far as I'm aware. – Alxe Sep 03 '21 at 13:52
  • 1
    Marking your reply as accepted, because when I asked the Support team at Slack, I basically received your reply. :) For reference, one of my questions is if there are plans to publicise this API, but there's no schedule for that. – Alxe Sep 03 '21 at 19:55