Create Invite Link
Generates an invitation link for a Discord channel.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Client Id - The Discord bot client identifier from the Connect node (optional if Bot Token provided).
- Channel Id - The ID of the Discord channel to create an invitation link for.
Options
- Bot Token - Discord bot token credential (optional if using Client ID from Connect node).
Output
- Link - The generated Discord invite link (e.g., https://discord.gg/abc123xyz).
How It Works
The Create Invite Link node generates a temporary invitation link for a Discord channel. When executed, the node:
- Authenticates using either Client ID or direct bot token
- Validates the channel ID
- Creates an invite with temporary settings
- Constructs the full invite URL
- Returns the complete invite link
Requirements
- Active Discord bot session (Client ID) or bot token credentials
- Valid channel ID
- Create Instant Invite permission in the target channel
- The bot must be a member of the server
Error Handling
The node will return specific errors in the following cases:
- ErrInvalidArg - Client ID or bot token missing/invalid
- ErrInvalidArg - Channel ID is empty or invalid
- Discord API errors (missing permissions, channel not found, etc.)
Invite Link Properties
The generated invite link is:
- Temporary - The invite is set as temporary
- Unique - Each execution generates a new invite code
- Standard format - https://discord.gg/{invite_code}
Example: Generate Server Invite
Inputs:
- Channel Id: "123456789012345678"
Flow:
1. Create Invite Link → link
2. Send message with invite
- Message Text: "Join our server: {{link}}"
Result: Generates and shares an invite link.
Example: Auto-Invite System
Flow:
1. Receive Message → message
2. Condition: message.Content == "!invite"
3. If True:
- Create Invite Link
- Channel Id: "123456789012345678"
- Send Direct Message
- User Id: {{message.Author.ID}}
- Message Text: "Here's your invite: {{link}}"
Result: Bot sends invite link via DM when requested.
Example: Event Invitations
Flow:
1. Create event channel
2. Create Invite Link → event_link
3. Send announcement
- Message: "Event starting! Join here: {{event_link}}"
Result: Generate invite for event participants.
Use Cases
- Automated invites - Send invites automatically when requested
- Event links - Create temporary invites for events
- Onboarding - Send invite links to new users
- Partner integration - Share invites with partner systems
- Referral systems - Generate unique invites for tracking
- Support tickets - Create invite links for support channels
Invite Configuration
This node creates invites with these default settings:
- Temporary - Set to true (members will be kicked on disconnect if they have no roles)
- Max Age - Default (24 hours)
- Max Uses - Unlimited (within Discord's limits)
For custom invite settings, you would need to use Discord API directly.
Channel Types
Invites can be created for:
- Text channels - Most common
- Voice channels - Users join the voice channel
- Stage channels - Users join as audience
- Announcement channels - For community servers
Bot Permissions Required
- Create Instant Invite - Required to generate invite links
Invite Expiration
The default temporary invite:
- Expires after 24 hours
- Removes invited users on disconnect if they don't have roles
- Has unlimited uses until expiration
Security Considerations
- Temporary invites - Good for short-term access
- One-time invites - Consider manual invite settings for one-time use
- Monitoring - Track invite usage through Discord's audit log
- Revocation - Delete old invites regularly
- Channel selection - Choose appropriate channel for invite target
Tips and Best Practices
- Channel choice - Usually create invites for general or welcome channels
- Verification - Ensure the channel is appropriate for public access
- Permissions - Verify Create Instant Invite permission before generating
- Expiration - Remember invites are temporary by default
- Tracking - Store generated invite codes for tracking if needed
- Rate limiting - Don't generate excessive invites
- Security - Only share invites with intended recipients