discord / trigger / schema v1
Discord: Button Click
Trigger when a user clicks a button component on a message
Prerequisites
- Add the discord plugin inside this workflow.
- Connect and authorize a discord account before running this node.
Parameters
| Parameter | Type | Description |
|---|---|---|
ServerguildId | discord_guild Required | |
Which buttonbuttonId | tags Optional | Pick the button this answers. One your message steps create. Leave empty to answer every button. |
Role FilterroleFilter | discord_role Optional | Only trigger if the user has any of these roles |
Open a form (modal) on clickopenModal | modal_builder Optional | When set, clicking the button OPENS this form instead of running the flow below. Handle the submission with a "Discord: Modal Submitted" trigger (match custom_id). |
Inputs and outputs
Inputs
No ports declared.
Outputs
on_button- On Click (output)interaction_id- Interaction ID (output)custom_id- Button ID (output)user_id- User ID (output)username- Username (output)user_avatar- User Avatar URL (output)channel_id- Channel ID (output)guild_id- Server ID (output)message_id- Message ID (output)member_roles- Member role IDs (output)interaction_token- Reply pass (output)timestamp- Timestamp (output)
Output data schema
[
{
"key": "interaction_id",
"type": "snowflake",
"label": "Interaction ID",
"bindingRole": "current_context"
},
{
"key": "custom_id",
"type": "string",
"label": "Button ID"
},
{
"key": "user_id",
"type": "user",
"label": "User ID",
"bindingRole": "actor"
},
{
"key": "username",
"type": "string",
"label": "Username",
"bindingRole": "actor"
},
{
"key": "user_avatar",
"type": "url",
"label": "User Avatar URL"
},
{
"key": "channel_id",
"type": "channel",
"label": "Channel ID",
"bindingRole": "current_context"
},
{
"key": "guild_id",
"type": "guild",
"label": "Server ID",
"bindingRole": "current_context"
},
{
"key": "message_id",
"type": "snowflake",
"label": "Message ID"
},
{
"key": "member_roles",
"type": "array",
"label": "Member role IDs",
"items": {
"key": "role_id",
"type": "snowflake",
"bindingRole": "actor"
},
"bindingRole": "actor"
},
{
"key": "interaction_token",
"type": "string",
"label": "Reply pass",
"description": "Used automatically when you reply to this. You normally never need to insert it yourself.",
"bindingRole": "current_context"
},
{
"key": "timestamp",
"type": "timestamp",
"label": "Timestamp"
}
]Examples and troubleshooting have not yet been reviewed for this contract.
Version and compatibility
This reference follows the current authoring contract. Existing workflows retain their saved node revisions.
Contract identifier
323859920ccb6abf1ae6b2c27d5e9b6241fcb8ca02a6eedf1719e6519e1a6a55