Actions17
Chat → Menu
AI-generatedSummary
Present a text-based menu to the user with configurable options, prompt, and invalid-choice fallback, returning the selected option output or onNone.
Inputs
- promptMenu — Prompt to be shown to the user
- mensagemEntrada — Message to be shown when entering the menu state
- mensagemOpcaoInvalida — Message to be shown when the user chooses an invalid option
- mensagemTipoMensagemIncorreta — Message when the user sends a non-text message
- useNativeMenu — Whether to use the native menu of the platform instead of a text menu
- estados — Add menu option, each with key, texto, and optional outputName
Output shape
main
Each configured option in 'estados' produces a main output labeled with its 'outputName' if set, otherwise 'onOption{key}'. A final 'onNone' main output is returned for invalid selections or non-text messages without native menu.
Examples
Example 1: User selects the first menu option
Estados: [{key: '1', texto: 'Option 1', outputName: 'onChoiceOne'}] ... useNativeMenu: false ... promptMenu: 'Choose an option' ... mensagemEntrada: 'Please select: ' ... mensagemOpcaoInvalida: 'Invalid choice' ... mensagemTipoMensagemIncorreta: 'Please enter text' ... All other parameters at defaults.