Skip to main content

Get all members of a Discord server with a specific role

Workflow preview

Workflow preview
100%
Get all members of a Discord server with a specific role preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 ove...

Best for

  • Market Research automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.merge, n8n-nodes-base.if, n8n-nodes-base.noop, n8n-nodes-base.filter, n8n-nodes-base.discord, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Niklas Hatje.

Original n8n.io source

1.1 Workflow description

Title
Get all members of a Discord server with a specific role
Workflow name
Get all members of a Discord server with a specific role

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 user we received last to return all Members (of a certain role) from a Discord server in batches of 100 members.

Setup

  1. Add your Google Sheets and Discord credentials.
  2. Create a Google Sheets document that contains ID as a column. We're using this to remember which member we received last.
  3. Edit the fields in the setup node Setup: Edit this to get started. You can read up on how to get the Discord IDs via this link.
  4. Link to your Discord server in the Discord nodes
  5. Activate the workflow
  6. Call the production webhook URL in your browser

Requirements

  • Admin rights in the Discord server and access to the developer portal of discord
  • Google Sheets
  • Minimum n8n version 1.28.0

Potential Use cases

  • Writing a direct message to all members of a certain role
  • Analysing user growth on Discord regularly
  • Analysing role distributions on Discord regularly
  • Saving new members in a Discord
  • ...

Keywords

Discord API, Getting all members from Discord via API, Google Sheets and Discord automation, How to get all Discord members via API

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking "Test workflow"

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Delete ID

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.2

Block 3 - SaveID

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.2

Block 4 - Get ID

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.2

Block 5 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 2.1

Block 6 - Check if we have more members left

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 7 - We're done

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 8 - Check if we have an ID

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 9 - Filter to only include members with role

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2

Block 10 - Get First 100 Members

Type / Role
n8n-nodes-base.discord - discord
Config choices
Version 2

Block 11 - Get next 100 Members after last ID

Type / Role
n8n-nodes-base.discord - discord
Config choices
Version 2

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Setup: Edit this to get started

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.3

Block 14 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 1.1

Block 15 - Send Response

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 16 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Get all members of a Discord server with a specific role
Complexity advanced
Nodes 16
Categories Market Research
Author Niklas Hatje
Published 19 Feb 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2105/2105.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Get all members of a Discord server with a specific role do?

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 ove...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research use case.