Slack Member Fetch
This skill fetches member information from Slack.
What it can do
- List members from the whole Slack workspace
- List members from a specific Slack channel by channel ID
- List members from a specific Slack channel by channel name
- Return structured JSON for downstream automation
Required environment variable
export SLACK_BOT_TOKEN="xoxb-..."
Recommended Slack scopes
users:read
users:read.email
conversations:read
Usage
Fetch all workspace members:
python3 scripts/fetch_slack_members.py --workspace
Fetch members from a channel by ID:
python3 scripts/fetch_slack_members.py --channel C0123456789
Fetch members from a channel by name:
python3 scripts/fetch_slack_members.py --channel-name general
Save output:
python3 scripts/fetch_slack_members.py --channel-name sales --out members.json
Output shape
{
"ok": true,
"source": "channel",
"channel_id": "C0123456789",
"channel_name": "sales",
"count": 2,
"members": [
{
"user_id": "U123",
"username": "jane",
"real_name": "Jane Doe",
"display_name": "Jane",
"email": "jane@example.com",
"title": "Operations Manager",
"timezone": "Asia/Manila",
"is_admin": false,
"is_owner": false,
"is_bot": false,
"deleted": false
}
]
}
Notes
- If email is missing, confirm the app has
users:read.email
- If channel lookup fails, confirm the app has access to that channel and
conversations:read
- For large workspaces, the script follows Slack cursor pagination automatically