Skip to main content

Discord

Blokkio has two Discord apps:

AppUse it whenWhat you need
DiscordYou want to post in several channels, start threads, or read channels and messagesA bot you add to your server
Discord (webhook)You only need to post into one channelA webhook URL from the channel's settings

Discord (bot)​

1. Create a bot and get its token​

  1. Open the Discord Developer Portal and click New Application. Give it a name, for example Blokkio.
  2. Open Bot and click Reset Token. Copy the token: Discord shows it only once.
  3. If your workflows read message text (List messages), turn on Message Content Intent on the same page.
  4. Open OAuth2 → URL Generator, tick the bot scope, then the permissions your workflows need: View Channels, Send Messages, Create Public Threads, Create Private Threads, Send Messages in Threads and Read Message History.
  5. Open the generated URL, pick your server and click Authorize. The bot now appears in the member list.

2. Create the connection​

  1. In Blokkio, go to Apps and open Discord.
  2. Click Connect, give the connection a name, paste the token into Bot token and click Create.
  3. Use ⋯ → Test connection on the Connections page. Blokkio calls GET /users/@me and reports Connected — discord.com answered 200.

Blokkio sends the token as Authorization: Bot <token> to https://discord.com/api/v10, and only to discord.com.

Finding ids​

Actions take channel, server and message ids (long numbers). In Discord, turn on Settings → Advanced → Developer Mode, then right-click a channel, server or message and choose Copy … ID. You can also use the List servers and List channels actions.

Actions​

ActionWhat it doesMain inputs
Send messagePosts a message to a channel or threadChannel ID, Message (up to 2000 characters, Markdown), Embeds (JSON), Reply to message ID, Read aloud
Create threadStarts a thread in a text or forum channelChannel ID, Thread name, First message (required for forum channels), Thread type (11 public, 12 private), Auto-archive after (minutes)
Create thread from messageStarts a thread on an existing messageChannel ID, Message ID, Thread name
List channelsChannels of a serverServer ID
List serversServers the bot is inNone
List messagesLatest messages of a channelChannel ID, How many (1–100), Before / After message ID

The output of Send message includes the new message's id, which you can pass to Create thread from message.

Incoming webhook​

1. Create the webhook​

  1. In Discord, open the channel's Edit Channel → Integrations → Webhooks and click New Webhook.
  2. Optionally change its name and avatar, then click Copy Webhook URL. It looks like https://discord.com/api/webhooks/123…/AbC….

Anyone with this URL can post to the channel, so treat it like a password.

2. Create the connection​

  1. In Blokkio, go to Apps and open Discord (webhook).
  2. Click Connect and paste the URL into Webhook URL. To keep it in one place, store it as a secret and click Use secret.
  3. Test connection reads the webhook's details and doesn't post anything.

Blokkio only sends the request when the URL is on discord.com (or discordapp.com, canary.discord.com, ptb.discord.com); any other address is refused.

Actions​

ActionWhat it doesMain inputs
Send messagePosts to the webhook's channel and returns the messageMessage, Post as (name), Avatar URL, Embeds, Thread ID, New forum post title, Read aloud
Edit messageChanges a message the webhook sentMessage ID, Message, Embeds, Thread ID
Delete messageDeletes a message the webhook sentMessage ID, Thread ID

Troubleshooting​

MessageWhat to do
HTTP 401The bot token was reset or is wrong. Edit the connection and paste the current token.
HTTP 403 … Missing Access / Missing PermissionsThe bot isn't in that server, can't see the channel, or lacks a permission from step 4.
HTTP 404 … Unknown Channel / Unknown WebhookWrong id, or the webhook was deleted.
Refusing to send its credentials to …The webhook URL isn't a Discord address. Copy it again from Discord.
Messages arrive without text in List messagesTurn on Message Content Intent for the bot.