Slack Message Sender

Automatically send DMs to some or all members of a Slack Workspace.

Share:  
Table of Contents

Automatically send a Direct Message to all users of a Slack workspace.

Slack is becoming more and more useful as a way to build communities. The fact that's it's semi-private and that people answer quickly since they often also use it within their companies is really powerful.

Schedule and send customized messages to a list of your Slack workspace buddies. Really useful to spread the word in a personalized way about some topic that's dear to your heart.

You'll be able to message all the users of your list, or only those online when the API launches. That way you'll be able to handle all the answers you'll get.

In order to build that list of recipients, we recommend using our Slack Channel Users Extractor tool. It'll neatly gather all users from a specific channel in a spreadsheet.

What will you need? βš™οΈ

  • Your "Slack's Workspace URL": To find your Slack's workspace URL and cookie, you'll need to open it in your browser, not in app.
  • "d Session Cookie": That's your authentication d session cookie. Note that on each workspace your cookie will be different.
  • "Spreadsheet URL or a Slack User ID": The list of recipient's IDs you want to send messages to. You can a list of users with our Slack User Extractor API or copy users ID by hand. In browser, they look like this: https://mycompany.slack.com/messages/DD9FK9A56/.

Which steps to follow?

1. Create an account on Phantombuster.com πŸ’»

If you haven't already, create a FREE account on Phantombuster. Our service will browse the web for you. Our automations run in the cloud.

2. Use this API on your account.πŸ‘Œ

Now that you're connected to Phantombuster, Click on the following button (it will open a new tab).

3. Click on Configure me!

You'll now see the 3 configuration dots blinking. Click on them.

4. Easy & safe authentication

This automation will connect to Slack on your behalf. The safest and most efficient way for Phantombuster to authenticate as yourself is by using your session cookies.

To make that process as easy as possible you can use Phantombuster's browser extension. It's a 2-click installation.

If you're operating from another browser and/or want to do it manually, here is how to do it.

5. Input your Slack workspace's URL.

The second argument is "Slack Workspace URL". We need it to know which Slack workspaces you want to target.
This URL should look something like yourcompany.slack.com.

6. Input the spreadsheet URL containing your recipient's IDs.

The "Spreadsheet URL or Slack User ID" can take either one single ID – which might be alright for a prank – or a list of recipient in the form of Slack user ID's. For the latter, write down those IDs in a Google Spreadsheet, make the spreadsheet public and paste its URL the configuration form.

Click on Launch & Enjoy!

It’s done! All that is left to do is to click on "launch" to try your script!

More bots like this one will be added to Phantombuster,

stay tuned & check our API store!πŸ’—

Output

This API will output CSV and/or JSON containing the following fields:

  • id
  • firstName
  • lastName
  • fullName
  • pictureUrl
  • displayName
  • title
  • phone
  • email
  • skype
  • timezone
  • lastUpdate
  • query
  • channel
  • workspaceUrl
  • message

Share this API

Your friends & colleagues need to know about this!