Use Discord with SmythOS
Send real-time updates, automate community responses, or just drop a message into a Discord server... right from your SmythOS agent.
INFO
Why Use Discord With Your Agent?
Discord isn’t just for gamers. It’s a powerhouse for real-time conversations, communities, and automation. With the Send Message component, you can:
- Post real-time updates from your agent
- Push notifications from workflows and conditional logic
- Sync backend events with your community
- Automate community interaction from your product, CRM, or custom data store
Prerequisites
Before integrating Discord:
- Create a Discord Application
- Add a bot to the application to generate a Bot Token
- Invite the bot to your server with
Send Messages
permission - Optionally configure Vault → API Keys for securely managing your Bot Token
Step-by-Step: Integrate Discord
Step 1: Add Your Bot Token
- Open your app in the Discord Developer Portal
- Go to the Bot tab
- Copy the Bot Token
- In SmythOS, paste the token into the component’s settings under Bot Token
INFO
Step 2: Configure Component Settings
Inside the Send Message component, set:
- Bot Token: Add from Vault or directly in settings
This authorizes your bot to send messages to your target server and channel.
Step 3: Define Inputs
Here’s a sample payload:
{
"channel_id": "123456789012345678",
"content": "Hello, Discord! This is your SmythOS agent speaking."
}
Required:
- channel_id: Copy this from Discord by right-clicking the target channel > Copy ID
- content: Your message. Supports markdown, mentions, emojis (up to 2000 characters)
INFO
Step 4: Use the Outputs
After execution, you’ll get:
- response: JSON object with content, timestamp, bot name, and more
- headers: HTTP metadata
- messageId: The message’s unique ID for reference, updates, or logs
You can log or reference this data in follow-up steps.
Optional: Deploy via Model Context Protocol (MCP)
If your agent is deployed using MCP Server, you can:
- Set up the Discord component in the agent canvas as usual.
- Expose this workflow endpoint via MCP using a route that maps to a Discord action.
- Use a POST request (e.g., from an app or webhook) to hit the MCP URL, and pass the required
channel_id
andcontent
values. - The deployed agent handles the authentication and message delivery.
INFO
This method allows external systems to trigger Discord messages without embedding the bot logic outside SmythOS.
What’s Next?
- Combine this with Deploy as API to expose Discord actions externally
- Create workflows that send alerts when conditions are met
- Chain Discord outputs into custom dashboards or external tools
- Log activity with Agent Logs
Connect Discord to SmythOS using Bot Token and channel_id for automated messaging. Deploy using MCP or API.