View as Markdown
Discord Bot icon

Discord Bot ACTION

Send message

Send message to a user or a channel. See the docs here and here
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Discord Bot account once, then configure and run Send message from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "discord_bot-send-message",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    discord_bot: { authProvisionId: "apn_xxxxxxx" },
    guildId: "Guild",
    message: "Message",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Send message inputs
Property Type Description
guildId Guild string
Discord Guild where your channel lives
Required Dynamic
message Message string
Enter a simple message up to 2000 characters. This is the most commonly used field. However, it's optional if you pass embed content.
Required
embeds Embeds any
Embedded rich content (up to 6000 characters), this should be given as an array, e.g. [{"title": "Hello, Embed!","description": "This is an embedded message."}]. To pass data from another step, enter a reference using double curly brackets (e.g., {{steps.mydata.$return_value}}). Tip: Construct the embeds array in a Node.js code step, return it, and then pass the return value to this step.
Optional
threadID Thread ID string
If provided, the message will be posted to this thread
Optional
username Username string
Overrides the current username
Optional
avatarURL Avatar URL string
If used, it overrides the default avatar
Optional
includeSentViaPipedream Include link to workflow boolean
Defaults to true, includes a link to this workflow at the end of your Discord message.
Optional
userId User string
Select either a user or a channel
Optional Dynamic
channelId Channel string
Select either a channel or an user
Optional Dynamic

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
discord_bot-send-message
Version
1.0.1
App
Discord Bot
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes