Skip to content

Channel

Channel connects your flow to Discord through your bot to manage channels: see the servers your bot is in, look up the channels of a server or a specific one, create a new channel and delete a channel.

It is useful to organize a server automatically, for example to open a channel for every project, event or customer, and close it when it ends.

When to use it

  • Create a text channel for every new customer of your support service.
  • Open a voice channel for every event of your community.
  • Get the list of channels of a server so an agent can choose where to post.
  • Delete the channels of projects that are closed.
  • Know which servers your bot is installed on.

Configuration

You need a Discord API credential with the Public Key, Application ID and Bot Token of your application, which you find in the Discord Developer Portal. To create and delete channels, the bot needs the manage channels permission on the server. See Credentials.

In Discord, servers are also called guilds: that is why the fields mention Guild ID.

FieldWhat it does
Credential (required)Your bot’s Discord API credential.
Operation (required)What the component does. See Operations.
Guild IDThe ID of the Discord server. Required in Create Channels and in Get Channels with By Guild. You find it in the result of Get Guilds.
FilterOnly in Get Channels. By Guild returns the channels of a server; By ID returns one channel. Default: By Guild.
Channel IDThe channel’s ID. Required in Delete Channels and in Get Channels with By ID.
TopOnly in Get Channels with By Guild. The maximum number of channels to return. Default: 10.
Filter TypeOnly in Get Channels with By Guild. Returns only channels of one type, given by its number: 0 for text, 2 for voice, 4 for categories and 15 for thread forums.
ModeOnly in Create Channels. How you describe the new channel. Data Entry (Single Channel) shows Item to receive it from another component; Manual Entry (Single Channel) shows Name and Type to type it in. Default: Data Entry (Single Channel).
ItemWith Data Entry (Single Channel). The channel’s details, with its name in name, its type in type (the same number as in Filter Type) and, if you want, Discord settings in options, such as the channel topic in topic.
NameWith Manual Entry (Single Channel). The new channel’s name.
TypeWith Manual Entry (Single Channel). The channel type: 0 : Text channel, 2 : Voice channel, 4 : Channels Container (a category that groups channels) or 15 : Threads channel (a thread forum). Default: 0 : Text channel.

Operations

OperationWhat it does
Create ChannelsCreates a channel on the given server.
Delete ChannelsDeletes a channel.
Get ChannelsReturns the channels of a server or one channel.
Get GuildsReturns the servers your bot is in.

Output

The Data output returns the channels or servers you worked with. Each channel has its ID (id), name, type, server (guild_id), the category it belongs to (parent_id), topic (topic) and position. Each server has its ID (id) and name. Delete Channels returns a confirmation.

If Discord rejects the operation, for example because the bot has no permissions, the result has status set to error and the reason, instead of stopping the flow.

You can use the channel ID in Message to post in it. The component can also be connected to an Agent as a tool. See Tool Mode.

Example

A technical support company opens a follow-up channel for every new customer.

  1. The new customer reaches the flow with the company name.
  2. Add Channel with the Create Channels operation and Mode set to Manual Entry (Single Channel).
  3. In Guild ID, paste your server’s ID; in Name, the customer’s name; leave Type as 0 : Text channel.
  4. Connect the result to Message to post a welcome message in the new channel, using its id.

Good practices

  • Deleting a channel also deletes all its messages. Check the Channel ID before running Delete Channels.
  • Discord only accepts lowercase letters, numbers and hyphens in text channel names. If you type other characters, Discord adapts them.
  • Message: sends and reads messages in the channels.
  • Member: looks up members and manages roles.