52

Is it possible to invite all users (the entire team) to a new Slack channel? It seems there are limits to the number of people that can be invited at once.

  • Related. (Possible duplicate?) Invite multiple Slack users to a channel – ale Dec 2 '16 at 19:04
  • Yeah, that is related but not really a duplicate. That question does not provide a solution to my problem. – Abram Dec 2 '16 at 19:08
  • 1
    If you are using a multi-workspace solution (Slack Enterprise Grid) your user list may include people outside your workspace. If your #channel is workspace-specific, these solutions potentially add ALL users to the channel. – Choovermonium Mar 5 '18 at 17:09
  • 2
    Check the "Channel Tools" answer by @jai. A lot of the other responses don't work any longer, but that integration is solid. Just tried it for inviting 100+ users to an existing channel. – Alex G Sep 18 at 0:26
3

This is finally possible with /invite @listname – when you type /invite @ auto suggest will give you more options than via the "invite people" link.

| improve this answer | |
  • I get /invite @username #listname to work, but only for adding one user at a time... – Nagel Jan 14 at 21:36
46

Found a more straightforward solution. No script, no extensions:

  1. Type the /who command on a channel where you have the (most) people you want to add.
  2. Copy the output
  3. Paste it in the channel where you want those people to get invited to
  4. Press Intro/Enter key

Slack will ask you what to do with all those people "that are not in the channel yet". If you press the Invite button you'll get everybody invited

| improve this answer | |
  • I didn't actually test this answer, but assuming it works, it should be marked the correct solution. I have assigned this as the solution, but would appreciate confirmation from others that the solution works. Thanks! – Abram Dec 27 '18 at 21:12
  • 2
    It worked for me. It did put a post in the new channel with everyone's @ in it. But that's fine by me. – davepreston Mar 6 '19 at 23:13
  • 5
    This is however limited to show the first 99 members of the channel (which you can copy/paste). – Jan Mar 18 '19 at 10:56
  • 1
    This should be the accepted answer! – Joaquin Iurchuk Feb 19 at 18:03
  • You can also paste the names into the "Add People" list. Slack will parse out all the commas, and recognize the @mentioned names. This can help you skip posting an actual message to the room. – Mikhail Sep 18 at 22:59
45

Since @Abram solution stopped working I played a little bit. This one works partially for me now, you might need to run it a couple times though

His instructions: Just browse to the appropriate channel and paste this script (below) into your Chrome/Firefox dev console and hit enter. Then wait for the script to run until it completes. It might take time as there is a limit to how many users may be invited at once. The script will loop until all team members are invited.

var foundAny=false;
function selectAllByLetter(remainingLetters) {
  console.log(remainingLetters)
  var letter = remainingLetters.pop();
  $("#channel_invite_filter").val(letter).trigger("input");
  setTimeout(function() {
    $(".channel_invite_member:not(hidden)").each(function(i, obj) {
        foundAny=true;
        this.click();
    });
    if (remainingLetters.length) {
      selectAllByLetter(remainingLetters);
    } else {
      setTimeout(function() {
        console.log("Inviting them all!")
        $('.invite_go').click()
      },400)     
    }
  },300);
}

function inviteAllUsers() {      
  foundAny=false;     
  setTimeout(function () {    
      setTimeout(function() {
        $('#channel_actions_toggle').click();
      },100)
      setTimeout(function() {
        $('#channel_invite_item').click();
      },200)
      //Enter each letter to trigger searches
      var remainingLetters = ["a","b","c","d","e","f","g","h","i","j","v","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
      selectAllByLetter(remainingLetters);
      if (foundAny) {
        inviteAllUsers();
      }
   }, 4000);
}
inviteAllUsers();  
| improve this answer | |
  • 1
    Works like a charm, thanks! – Pwdr Mar 14 '17 at 10:58
  • 2
    Thanks for providing a working answer. I will remove mine since it has stopped working. – Abram Mar 21 '17 at 3:07
  • 2
    Care, this also invite bots in channel – Tib Nov 3 '17 at 13:14
  • Yes it does. Also, for some reason with big groups you need to run it twice – John Alexis Guerra Gómez Apr 11 '18 at 23:42
  • This looks like it has stopped working. – Daniel Hollands Feb 10 at 9:04
5

If there are more than 100 members to be invited.

Use Channel Tools app.

Channel Tools helps you bulk invite all members from one Slack channel to another

If you have been wondering how to invite all team members to a new Slack channel, Channel Tools is your answer. Our app makes it super easy to add members to your Slack channel in bulk. If you are managing a large team or a community, you have faced this problem one way or the other. There is no easy way to invite users in bulk. If you have tried doing it manually, we know your pain. But no more.

The app comes with /invite_channel [channel] command. Install the app to your Slack team first. Next, the bot user, @Channel Tools needs to be added to both the source and the destination channels.

  1. Invite @Channel Tools to the source channel. /invite @Channel Tools #design (If you want to add users from #design)

  2. Invite @Channel Tools to the destination channel. /invite @Channel Tools #team (If you want to add users to #team channel)

  3. Now, go to the destination channel, #team, and type: /invite_channel #design

How to add all users to Slack channel using Channel Tools

  1. Follow the instructions, once the task is done, all the members from #design should be present in #team channel. At the end of the process, it gives you information on the number of users invited, common users in both the channels, and errors, if any.

How to invite all users to Slack using Channel Tools

How to invite all users in a workspace to a new channel?

Slack adds all users to the #general channel by default (it should be the same unless you have changed this in your team preferences). Use #general as the source channel while using /invite_channel command, and you should be good.

/invite_channel #general

Pros: Easy to use. Works for any number of users. It's a Slack app, if you can remember the native command /invite, then it is easy enough to remember /invite_channel as well. Good for repetitive tasks.

Cons: It would be an overkill if you are looking to invite ~50 users, or it is a one-off task.

The app is available here.

If the number of users to be invited is less than 100

Use /who command:

  1. Go to the channel from where you want to add users in bulk. Typically, #general is where most of the users are. Enter /who /who command in Slack

  2. This gives a list of all the users in that channel. Copy the list.

out put of /who command in Slack

  1. Go to the channel where you want to invite them
  2. In the new message panel, paste the list that you copied in the previous step.
  3. Slack would ask you to invite the users who are already not present in the channel.

Slack asks you to invite users not present in the channel

Pros: Simple approach. No external app, extension, script needed.

Cons: /who command is limited to 100 members. If some users are already present in the channel, the message with the list will send them a notification. Also, the list of users is a public message, which might not be desirable.

If your use case is more complex, you are probably better off with the previous method.

Disclaimer: I'm the maker of Channel Tools app

| improve this answer | |
  • Thanks @Jai Pandya for this tool, this is really time-saving with easy UI. – cpz Aug 31 at 16:15
4

Wrote a script that also does the same thing.

Steps:
1. Go to channel page
2. Copy/paste code into browser console

All users will be added.

//////////////////////////////
// AFTER.JS Module
//////////////////////////////

var After = function () {
    this._totalTime = 0;
};

// It's prototype
var protoAfter = {
    // After (time) seconds, run a handler
    after: function (time, handler) {
        this._totalTime += time;

        setTimeout(function () {
            handler();
        }, this._totalTime * 1000);

        return this;
    }
};

$.extend(After.prototype, protoAfter);

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ End of After section

var first = "a",
    last = "z";

var after = new After();
after.charIndex = first.charCodeAt(0);

for (var i = first.charCodeAt(0); i <= last.charCodeAt(0); i++) {

    after
        .after(0.3, function () {
            $('#channel_actions_toggle').click();
        })

        .after(0.3, function () {
            $('#channel_invite_item').click();
        })

        .after(0.3, function () {
            $("#channel_invite_filter").focus();
            $("#channel_invite_filter").val(String.fromCharCode(after.charIndex)); // type in character
            $("#channel_invite_filter").trigger("input");
            after.charIndex++;
        })

        .after(0.5, function () {
            $(".add_icon").click();
        })

        .after(0.5, function () {
            $(".invite_go").click();
        })

        .after(0.5, function () {
            $("#fs_modal_close_btn").click();
        })
}
| improve this answer | |
-1

If you're not a programmer, there is a chrome extension that will do the job. https://chrome.google.com/webstore/detail/slack-invite-all/okakcmghmbmdgbccjfclfkeednhhlpeg

| improve this answer | |
  • 2
    This is $1.99 a month. Absolutely ridiculous. – A.B. Carroll May 30 '18 at 3:07
  • That URL is dead. – Mxx Jun 2 at 20:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.