Created
February 14, 2017 21:24
-
-
Save steve-jansen/6e7a09dcf67d280bd382e59b99ee4298 to your computer and use it in GitHub Desktop.
Bulk invite Slack users to a channel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for u in $(jq --raw-output ". | .[]" < members.json); do | |
clear; | |
echo Inviting user ${u}; | |
curl -i -X GET "https://slack.com/api/channels.invite?token=${API_TOKEN}&channel=${CHANNEL}&user=${u}" | head -n 20; | |
sleep 1; | |
done; |
Since legacy tokens are no longer endorsed by Slack themselves, does anyone have a better / more recent solution for this?
If you are looking for a no-code solution, you can use Channel Tools app to invite all users to a Slack channel (and more).
Disclaimer: I'm the maker of the app.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Deprecated!
The best practice is now described in the Web Applications StackExchange: How do I invite all team members to a new Slack channel?