Templates / Get all members of a Discord server with a specific role

Get all members of a Discord server with a specific role

Ready for 3.0

by Niklas Hatje ✓ · 3,830 views · created 2024-02-19 · Market Research

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 14 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Google Sheets and Discord.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).

  1. Setup: Edit this to get started (Edit Fields (Set)): sets 3 fields: Role ID, Google Sheets URL, Discord ID
  2. Get ID (Google Sheets): uses Google Sheets
  3. Check if we have an ID (If): checks a condition and branches into true / false
  4. Get next 100 Members after last ID (Discord): work with member
  5. Get First 100 Members (Discord): work with member
  6. Merge: merges the data from its input branches
  7. Check if we have more members left (If): checks a condition and branches into true / false
  8. Filter: keeps only the items that match a condition
  9. Delete ID (Google Sheets): delete
  10. Send Response (Respond to Webhook): sends the response back to the webhook caller

…plus 1 more step. See the full node list below.

Services it uses

Google SheetsDiscord

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (10)

From the author

Use Case This workflow retrieves all members of a Discord server or guild who have a specific role. Due to limitations in the Discord API, it only returns a limited number of users per call. To overcome this, the workflow uses Google Sheets to track which…

Excerpt from Niklas Hatje's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.