1

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 Answers1

2

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.

Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114