Passa al contenuto principale

Modals

Actions in the category "Modals".

Show modal​

Opens a modal popup form for the user.

Inputs

NameTypeRequiredDetails
InteractionInteractionYesThe interaction to respond to with a modal.
ModalModalYesThe 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

NameTypeRequiredDetails
InteractionInteractionYesThe interaction to open the modal on (its reply slot is used to show the modal).
ModalModalYesThe modal form to display and wait for.
TimeoutDurationYesHow long to wait for the submission (5 seconds up to 15 minutes; default 5 minutes). Value: 5000 to 900000. Default: 300000.

Branches

NameDetails
On submitRuns 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 timeoutRuns 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

NameTypeRequiredDetails
SubmissionModal submitYesThe modal submission to read from.
FieldTextYesCustom ID of the field to read, as set on that field in the modal. Maximum length: 100 characters.

Outputs

NameTypeDetails
ValueField answerThe user's answer for that field, or empty when no field has this custom ID. May be empty.
Need more help?
Can't find what you're looking for? Our team is happy to help.