Discord
Send and read Discord messages from InTouch jobs and the AI assistant — either through a channel incoming webhook (no bot, no token) or through a bot token that can post to and read any channel the bot can see.
Grounded in the official Discord REST API (https://discord.com/api/v10).
Standard-library Python only — no external dependencies.
Operations
| Operation | Method + endpoint | Auth | Required input |
|---|---|---|---|
webhook.execute |
POST /webhooks/{id}/{token} |
webhook URL | webhookUrl, content |
webhook.get |
GET /webhooks/{id}/{token} |
webhook URL | webhookUrl |
channel.send |
POST /channels/{channelId}/messages |
bot token | apiKey, channelId, content |
channel.messages |
GET /channels/{channelId}/messages?limit=N |
bot token | apiKey, channelId |
webhook.execute is called with ?wait=true, so Discord returns the created
message object in result.
Inputs
apiKey— Discord bot token (only needed for thechannel.*operations).operation— one of the four above.webhookUrl— full webhook URL for thewebhook.*operations.channelId— channel snowflake ID for thechannel.*operations.content— message text (≤ 2000 chars).username— optional display-name override forwebhook.execute.limit— message count forchannel.messages(1–100, default 50).
Outputs
result— the Discord JSON payload (message object, webhook object, or array of messages) as a JSON string. On a non-2xx response this holds Discord's error body andstatusis the HTTP code.status— HTTP status code ("200","204","401", …) or"error".
Getting credentials
Webhook URL (simplest, no bot):
1. In Discord, open a channel → Edit Channel → Integrations → Webhooks → New Webhook.
2. Copy the Webhook URL:
https://discord.com/api/webhooks/123456789012345678/AbCdEf...
3. Pass it as webhookUrl. No apiKey needed.
Bot token (for reading channels / posting as a bot):
1. Go to https://discord.com/developers/applications → New Application.
2. Bot tab → Reset Token → copy the token. Pass it as apiKey.
3. Enable the Message Content Intent (Bot tab) if you need message text.
4. Invite the bot to your server with the Send Messages / Read Message
History permissions, then use the channel's ID (Developer Mode → right-click
channel → Copy Channel ID) as channelId.
Examples
1. Post an alert to a channel via webhook
operation: webhook.execute
webhookUrl: https://discord.com/api/webhooks/123.../AbCd...
content: Build #482 passed ✅
username: InTouch CI
2. Read the last 20 messages of a channel as a bot
operation: channel.messages
apiKey: <bot-token>
channelId: 987654321098765432
limit: 20
result will be a JSON array of the most recent messages (newest first).