Slack POST multiple messages to a channel at once

后端 未结 1 1886
礼貌的吻别
礼貌的吻别 2020-12-19 14:26

I need to post multiple bot replies (responses determined dynamically) to the same channel. The obvious way seems to be to do an HTTP POST for each message in succession usi

相关标签:
1条回答
  • 2020-12-19 15:16

    No, there is no bulk variant. So you basically need to build your own bulk message sender.

    Keep in mind that there is a request limit of 1 message per second or your API requests will fail.

    There also is a 3 seconds request time-out for many requests between Slack and your app. (e.g. for direct response to slash commands). So if your bot needs to send many messages you want to use an approach that allows you to send them asynchronously.

    One solution to this problem that works very well for me is to use a messaging queue for all Slack messages sent from my bots.

    0 讨论(0)
提交回复
热议问题