Skip to content

Instantly share code, notes, and snippets.

@Rican7
Created February 24, 2017 22:43
Show Gist options
  • Save Rican7/ef3d5dead3a9a98f8b1c13155d4de4a4 to your computer and use it in GitHub Desktop.
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`
#!/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