Workflow

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.

Needle Team

Last updated

February 12, 2026

Connectors used

Google Sheets

Tags

SlackMember ScrapingGoogle SheetsData ExportTeam DirectoryWorkspace ManagementEmployee Directory

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

StepWhat Happens
1. Manual triggerYou paste a fetch() request from Slack's users list API
2. Parse authenticationCode node extracts token, cookie, and workspace channel
3. Loop with paginationLoop node automatically handles pagination (up to 200 pages)
4. Build API requestCode node constructs the request payload with pagination marker
5. HTTP requestCalls Slack API to fetch 50 members per page
6. Extract member dataCode node pulls members array and pagination info
7. AI transformationAI node processes each member and writes to Google Sheets
8. Continue loopingLoop updates with next marker and continues until all members are fetched

Setup Instructions

Step 1: Get Slack fetch() Request

  1. Open your Slack workspace in a browser (not the desktop app)
  2. Press F12 to open DevTools
  3. Go to the Network tab
  4. Search for members or click on a member profile
  5. Find a request to edgeapi.slack.com/cache/.../users/list
  6. Right-click the request → CopyCopy as fetch()

Step 2: Set Up the Workflow

  1. Click "Use template" on this page
  2. Click the Manual Trigger node
  3. Paste the fetch() code you copied
  4. Click the AI Transform node
  5. Add your Google Sheet URL in the prompt (replace <ADD YOUR GOOGLE SHEET URL HERE>)
  6. Connect a Google Sheets connector (via Pipedream integration)

Step 3: Run the Workflow

  1. Click Run at the top
  2. 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

FieldDescription
user_idUnique Slack user ID
display_nameThe name shown in Slack
real_nameUser's full legal name
emailEmail address
titleJob title or role
status_textCurrent status message
status_emojiEmoji in status (e.g., 🏖️, 🤒)
first_nameFirst name
last_nameLast name
phonePhone number (if provided)
is_adminWhether user is a workspace admin
is_botWhether 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_marker token

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 ChangeHow
Output destinationReplace Google Sheets with another connector (Airtable, CSV, etc.)
Members per pageEdit the count: 50 in the Build Payload code node
Maximum pagesChange page < 200 in the Loop node's condition
Fields to extractModify the AI node's prompt to include/exclude fields
Filter membersAdd a conditional node to filter by role, status, or other criteria
Status message onlyRemove 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.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .