Skip to main content

Create Message

CreateMessage posts a message to a channel.

It calls POST https://discord.com/api/v10/channels/{channel_id}/messages.

The activity has 4 tabs: Configuration, Auth, Input, and Output.

Configuration

FieldRequiredDescription
NameOptionalName of the step, should be unique within this workflow.
DescriptionOptionalDescribe the purpose or function of this step.
Select Auth ContextOptionalAuthorization context used to authenticate the request.
Channel IdRequiredEnter the ID of the channel to retrieve details.

Auth

FieldRequiredDescription
Auth TypeOptionalSelect the authentication method for the request. Options: No Auth, Basic, API Key, OAuth 2.
Auth ResourceOptionalOAuth resource containing credentials.
User NameOptionalUsername for Basic Authentication.
PasswordOptionalPassword for Basic Authentication.
KeyOptionalAPI Key name for API Key Authentication.
ValueOptionalAPI Key value for API Key Authentication.

Input

This activity is built on the REST Client, so the Input tab is the generic HTTP request rather than a Discord-shaped payload.

FieldRequiredData TypeDescription
InputsOptionalObjectThe HTTP request.

Output

The activity returns an httpResponse object.

FieldData TypeDescription
status.codeIntegerNumeric HTTP status code.
status.messageStringShort message associated with the HTTP status.
headersObjectHTTP response headers.
bodyObjectParsed body of the response.

The response body carries 38 fields. The principal ones are:

FieldData TypeDescription
typeInteger
contentString
mentionsArray
mention_rolesArray
attachmentsArray
embedsArray
timestampString
edited_timestampString
flagsInteger
componentsArray
stickersArray
sticker_itemsArray
idString
channel_idString
authorObject
pinnedBoolean

The remaining fields are the rest of the object returned by this endpoint, as declared in the activity's output schema.