Modals
Actions in the category "Modals".
Show modal
Opens a modal popup form for the user.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Interaction | Interaction | Yes | The interaction to respond to with a modal. |
| Modal | Modal | Yes | The modal to display. |
Show modal and await submit
Shows a modal popup form as the reply to an interaction, then pauses the flow until the user submits it or the timeout expires. A modal can only be opened as an interaction response, so this consumes that interaction's reply. The wait survives bot restarts but is capped at a few minutes (a modal only stays open in the client that long); the submission is a brand-new interaction that MUST be answered within 3 seconds, so reply to or defer it early in "On submit". For a permanent form, use "Show modal" plus a "Modal submitted" trigger instead.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Interaction | Interaction | Yes | The interaction to open the modal on (its reply slot is used to show the modal). |
| Modal | Modal | Yes | The modal form to display and wait for. |
| Timeout | Duration | Yes | How long to wait for the submission (5 seconds up to 15 minutes; default 5 minutes). Value: 5000 to 900000. Default: 300000. |
Branches
| Name | Details |
|---|---|
| On submit | Runs when the user submits the modal. Answer the submission (reply or defer) within 3 seconds here. Optional. Provides to its steps: Submission (The modal-submit interaction; read its fields by custom id and reply to or defer it) |
| On timeout | Runs when the user does not submit the modal within the timeout. Optional. |
Get modal field
Reads one answer out of a submitted modal by the field's custom ID. The value matches the field type: text inputs give text, dropdowns and checkbox groups give a list, a single checkbox gives yes or no, and user, role, channel or file fields give the selected items. An unknown field ID gives an empty value.
Inputs
| Name | Type | Required | Details |
|---|---|---|---|
| Submission | Modal submit | Yes | The modal submission to read from. |
| Field | Text | Yes | Custom ID of the field to read, as set on that field in the modal. Maximum length: 100 characters. |
Outputs
| Name | Type | Details |
|---|---|---|
| Value | Field answer | The user's answer for that field, or empty when no field has this custom ID. May be empty. |