Create Invite
discord.create_invite
ActionChat & messagingconnection required
Calls the Discord API with the connection's credentials.
Create an invite link to a channel.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Discord
- Secret shape
- the bot token (sent as "Authorization: Bot <token>") for every op except discord.execute_webhook, whose secret is the webhook URL
- Resolved by
- config.connection_id, else node.connection_id
Configuration
6 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
channel_id Id of the Discord channel (right-click the channel → Copy Channel ID). | string | Yes | — | — | — |
max_age Seconds before the invite expires, 0-604800; 0 never expires. | number | No | — | 0–604800 | — |
max_uses How many times it may be used, 0-100; 0 is unlimited. | number | No | — | 0–100 | — |
temporary Grant temporary membership: members are removed when they disconnect. | boolean | No | — | — | — |
unique Always mint a new code instead of reusing a similar existing invite. | boolean | No | — | — | — |
reason Why the change was made; recorded in the server's audit log. | string | No | — | ≤ 512 characters | — |
Output
One shape.
result
| Field | Type | Example |
|---|---|---|
code The invite code. | string | — |
url The full https://discord.gg/<code> link. | string | — |
max_age Seconds until it expires, 0 for never. | number | — |
max_uses How many times it may be used, 0 for unlimited. | number | — |
temporary True when it grants temporary membership. | boolean | — |
created_at When the invite was created (ISO-8601). | string | — |
{
"code": "",
"created_at": "",
"max_age": 0,
"max_uses": 0,
"temporary": false,
"url": ""
}Notes
- Needs a Discord connection whose secret is the bot token.
- Needs the CREATE_INSTANT_INVITE permission in the channel.
See Create Invite run in a workflow.
In a technical demo we add the Discord connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.