Skip to main content

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

TL;DR: Add your Discord Bot Token, configure channel and message inputs, and plug the component into any workflow, including MCP deployments.

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:

Step-by-Step: Integrate Discord

Step 1: Add Your Bot Token

  1. Open your app in the Discord Developer Portal
  2. Go to the Bot tab
  3. Copy the Bot Token
  4. In SmythOS, paste the token into the component’s settings under Bot Token
INFO

Keep your Bot Token secure in Vault → API Keys.

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

Click + Add Input to pass dynamic values or support logic branches.

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:

  1. Set up the Discord component in the agent canvas as usual.
  2. Expose this workflow endpoint via MCP using a route that maps to a Discord action.
  3. Use a POST request (e.g., from an app or webhook) to hit the MCP URL, and pass the required channel_id and content values.
  4. The deployed agent handles the authentication and message delivery.
INFO

You must ensure that your bot is authorized in the server and that channel IDs passed via the API are accessible.

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.