Scrape Slack Workspace Members to Google Sheets
Export all members from any Slack workspace to Google Sheets with full profiles (name, email, title, status). Handles pagination automatically to fetch thousands of members.
Last updated
February 12, 2026
Connectors used
Tags
Key Takeaways
- Complete member profiles - Exports user ID, display name, real name, email, title, status, phone, and admin flags
- Automatic pagination - Handles workspaces with thousands of members, fetching 50 members per page
- Direct to Google Sheets - AI agent automatically writes each member to your spreadsheet
- No API key required - Uses your browser session via a copied fetch() request
- Full status data - Captures status text and emoji for each team member
What This Workflow Does
This workflow scrapes the complete member directory from any Slack workspace and exports it to Google Sheets. You copy a fetch() request from your browser's DevTools, and the workflow automatically loops through all pages, extracts member profiles (name, email, title, status, admin role), and writes each row to your spreadsheet.
Use cases:
- Create a company directory or org chart
- Export member lists for offboarding or security audits
- Build contact lists for internal communications
- Analyze team composition and titles
- Backup member data before workspace changes
How It Works
| Step | What Happens |
|---|---|
| 1. Manual trigger | You paste a fetch() request from Slack's users list API |
| 2. Parse authentication | Code node extracts token, cookie, and workspace channel |
| 3. Loop with pagination | Loop node automatically handles pagination (up to 200 pages) |
| 4. Build API request | Code node constructs the request payload with pagination marker |
| 5. HTTP request | Calls Slack API to fetch 50 members per page |
| 6. Extract member data | Code node pulls members array and pagination info |
| 7. AI transformation | AI node processes each member and writes to Google Sheets |
| 8. Continue looping | Loop updates with next marker and continues until all members are fetched |
Setup Instructions
Step 1: Get Slack fetch() Request
- Open your Slack workspace in a browser (not the desktop app)
- Press F12 to open DevTools
- Go to the Network tab
- Search for members or click on a member profile
- Find a request to
edgeapi.slack.com/cache/.../users/list - Right-click the request → Copy → Copy as fetch()
Step 2: Set Up the Workflow
- Click "Use template" on this page
- Click the Manual Trigger node
- Paste the fetch() code you copied
- Click the AI Transform node
- Add your Google Sheet URL in the prompt (replace
<ADD YOUR GOOGLE SHEET URL HERE>) - Connect a Google Sheets connector (via Pipedream integration)
Step 3: Run the Workflow
- Click Run at the top
- The workflow will automatically:
- Parse your Slack authentication
- Loop through all pages of members (up to 10,000 members)
- Extract each member's profile data
- Write each row to your Google Sheet
Data Extracted Per Member
| Field | Description |
|---|---|
| user_id | Unique Slack user ID |
| display_name | The name shown in Slack |
| real_name | User's full legal name |
| Email address | |
| title | Job title or role |
| status_text | Current status message |
| status_emoji | Emoji in status (e.g., 🏖️, 🤒) |
| first_name | First name |
| last_name | Last name |
| phone | Phone number (if provided) |
| is_admin | Whether user is a workspace admin |
| is_bot | Whether the account is a bot |
Pagination Details
The workflow automatically handles pagination:
- Members per page: 50
- Maximum pages: 200 (10,000 members total)
- Wait between requests: 500ms (to avoid rate limiting)
- Pagination method: Uses Slack's
next_markertoken
If your workspace has more than 10,000 members, you can increase the page limit by editing the Loop node's condition.
Customization
| What You Can Change | How |
|---|---|
| Output destination | Replace Google Sheets with another connector (Airtable, CSV, etc.) |
| Members per page | Edit the count: 50 in the Build Payload code node |
| Maximum pages | Change page < 200 in the Loop node's condition |
| Fields to extract | Modify the AI node's prompt to include/exclude fields |
| Filter members | Add a conditional node to filter by role, status, or other criteria |
| Status message only | Remove other fields from the AI node's structured output schema |
Troubleshooting
Q: The workflow fails with "Invalid token"
A: Your Slack session may have expired. Copy a fresh fetch() request from DevTools.
Q: Some members are missing email addresses
A: Email visibility depends on workspace settings and user privacy preferences. Not all members make their email public.
Q: The workflow stops after a few pages
A: Check the Loop node's condition. Make sure page < 200 allows enough iterations for your workspace size.
Q: How do I know if I got all members?
A: The workflow runs until hasMore is false, which means all pages have been fetched. Check your Google Sheet row count.
Q: Can I run this for multiple workspaces?
A: Yes, run the workflow separately for each workspace with a new fetch() request from each workspace.
FAQ
Q: Do I need admin permissions to export members?
A: No, any workspace member can typically see the member directory. However, visibility depends on workspace settings.
Q: Is this against Slack's terms of service?
A: This workflow uses the same API that your browser uses when viewing the member directory. However, be mindful of your organization's data policies.
Q: How long does it take to export 1,000 members?
A: With 50 members per page and 500ms wait between pages, approximately 10-15 seconds (20 pages × 0.5s + processing time).
Q: Can I schedule this to run automatically?
A: The workflow requires a fresh fetch() request with valid authentication, so it's designed for manual execution. For automated runs, you'd need to integrate with Slack's official OAuth.
Q: What if I don't want to use Google Sheets?
A: You can modify the AI node to use any other connector (Airtable, Notion, CSV file) or change the output mode to structured data and process it differently.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.