Button action
Start a flow when someone presses a button, or picks from a menu, that names the action.
trigger.action runs when someone presses a button, or makes a choice in a select menu, that names this action. It works for as long as the message exists, however old it is.
Settings
| Setting | What it does |
|---|---|
| Action | A short name. Buttons and menus point at it from their settings in Components. Only one flow can use each action name. |
Ways out
out.
Produces
| Token | Value |
|---|---|
{component.data} | What the button or menu was sent with, such as a row's number |
{component.message} | The ID of the message it's on |
{component.choiceLabel} | From a menu: the choice made |
{component.choice} | From a menu: the choice's ID |
Notes
- Answer the press with Update the button's message or Reply.
- A button or menu without an action only continues the run that sent it, and only for a day. Use an action for anything lasting, such as a poll, a role menu or a ticket panel.
- If a button or menu names an action that no flow runs, the checker reports an error.
Example
A role menu whose choices are colours, pointed at an action whose flow is a Switch on {component.choiceLabel} with an Add role for each.