Contents

Discord Component

discord_component · Nodes · Trigger · Trigger

Starts a workflow from Discord message component interactions.

Discord Component#

Starts a workflow from Discord message component interactions received through a discord_bot connection's gateway.

For multi-step state, store sessions in Feather tables. See Bot Form State With Feather Tables.

When to Use#

  • Handle button clicks
  • Handle select menu choices
  • Route component workflows by custom_id
  • Feed interaction IDs and tokens into Discord Action

Configuration#

connection#

The discord_bot connection whose gateway component interactions start the workflow. Add one under Settings → Connections; agents discover existing ones with list_connections and provider_name: "discord_bot", then pass the returned connection id. Gateway intents come from the connection's intents property.

custom_id_exact#

Optional exact custom_id filter. If set, only exact matches trigger the workflow.

custom_id_prefix#

Optional custom_id prefix filter. Used only when custom_id_exact is empty.

component_type#

Optional Discord component type number. For example, 2 filters to buttons.

Output Contract#

The node emits one output object:

{
  "event": "message_component",
  "interaction": {
    "id": "123",
    "application_id": "456",
    "token": "interaction_token",
    "channel_id": "789",
    "guild_id": "111",
    "user": { "id": "222", "username": "alice" }
  },
  "component": {
    "custom_id": "create_bot:confirm",
    "component_type": 2,
    "values": []
  },
  "message": {
    "id": "333",
    "channel_id": "789",
    "content": "Create bot?"
  }
}

Tips#

  • Exact custom_id matching takes precedence over prefix matching.
  • Each matching click or selection starts one run, in the order Discord sent them, including ones that arrive while earlier runs are still going.
  • Keep custom_id bounded and use Feather tables for multi-step state.
  • Use interaction.id and interaction.token with Discord Action to respond, defer, update, or show a modal.

Inputs

None.

Outputs

  • output

Configuration

FieldTypeRequiredDescription
connectionconnection(discord_bot)YesDiscord bot connection whose gateway component interactions start the workflow. Discover with list_connections provider_name=discord_bot.
custom_id_exactstringYesOptional exact custom_id match. Takes precedence over prefix.
custom_id_prefixstringYesOptional custom_id prefix filter, used when exact match is empty.
component_typenumberYesOptional Discord component type number, for example 2 for button.
base_configrecordNoShared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow).