Created
February 24, 2017 22:43
-
-
Save Rican7/ef3d5dead3a9a98f8b1c13155d4de4a4 to your computer and use it in GitHub Desktop.
Check the name of the deleted users in your Slack organization using `jq`
This file contains hidden or 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
#!/usr/bin/env sh | |
# | |
# Check the name of the deleted users in your Slack organization using `jq` | |
# | |
# Requires: | |
# - curl (https://curl.haxx.se/) | |
# - jq (https://stedolan.github.io/jq/) | |
set -u -o pipefail | |
curl -s https://slack.com/api/users.list?token="${SLACK_TOKEN}" \ | |
| jq '.members[] | select(.deleted == true) | select (.is_bot != true) | .profile.real_name' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment