Discord Modal Submit
discord_modal_submit · Nodes · Trigger · Trigger
Starts a workflow from Discord modal submit interactions.
Discord Modal Submit#
Starts a workflow from Discord modal submit 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#
- Process submitted modal fields
- Continue a component workflow after showing a modal
- Route modal workflows by modal
custom_id - Feed interaction IDs and tokens into
Discord Action
Configuration#
connection#
The discord_bot connection whose gateway modal submit 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 modal custom_id filter. If set, only exact matches trigger the workflow.
custom_id_prefix#
Optional modal custom_id prefix filter. Used only when custom_id_exact is empty.
Output Contract#
The node emits one output object:
{
"event": "modal_submit",
"interaction": {
"id": "123",
"application_id": "456",
"token": "interaction_token",
"channel_id": "789",
"guild_id": "111",
"user": { "id": "222", "username": "alice" }
},
"modal": {
"custom_id": "create_bot",
"fields": {
"name": "My Bot",
"username": "my_bot"
},
"components": []
},
"message": null
}
Tips#
- Exact
custom_idmatching takes precedence over prefix matching. - Each matching submission starts one run, in the order Discord sent them, including submissions that arrive while earlier runs are still going.
modal.fieldsis keyed by submitted componentcustom_id.modal.componentspreserves Discord's submitted component structure for advanced workflows.- Use Feather tables for concurrent multi-step form state.
Inputs
None.
Outputs
output
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
connection | connection(discord_bot) | Yes | Discord bot connection whose gateway modal submit interactions start the workflow. Discover with list_connections provider_name=discord_bot. |
custom_id_exact | string | Yes | Optional exact modal custom_id match. Takes precedence over prefix. |
custom_id_prefix | string | Yes | Optional modal custom_id prefix filter, used when exact match is empty. |
base_config | record | No | Shared 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). |