Slack Send Direct Message to ALL on SLACK (Not group message I want to send individual message

独自空忆成欢 提交于 2019-12-24 07:50:01

问题


my question is whether Slack can Send Direct Message to ALL persons on my group on SLACK (Not group message I want to send an individual message


回答1:


There is no API method for that, but you can create this functionality easily with a small script.

  1. Get all members of a Slack team incl. their user IDs with users.list
  2. Loop through all active users (ignore the ones with deleted = false)
  3. Send a direct message to each user with chat.postMessage by using their user ID as channel

Be sure though to respect the rate limit of max. 1 message per second or the API will return errors.



来源:https://stackoverflow.com/questions/46250971/slack-send-direct-message-to-all-on-slack-not-group-message-i-want-to-send-indi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!