Bind a value
Suppose the message was sent with:request_title, for example in the title of a Section. Bind it to request.title. In API configuration, the binding is:
Request {{request.id}}: {{request.title}} produces text. This is string interpolation, not arbitrary computation; precompute currency, dates, totals, and custom logic upstream.
Name placeholders for the modal, not the message
A modal can be opened from buttons on any number of templates, and each button binds its own message data to the modal’s placeholders. Name placeholders for what the modal needs, so every template can supply them:- Bind top-level names. A binding supplies a whole name: bind
tickettorequestand the modal can read{{ticket.title}}and{{ticket.id}}. A binding to a dotted name such asticket.titlenever reaches the modal. userandteamcome from Slack. Every button supplies the clicking user and the workspace, so{{user.name}}needs no binding.- Avoid reading the message directly. A modal can also read the sending message’s data, the clicked card (
rowData,this) andbuttonwithout a binding. That only works for templates and buttons shaped that way; opened from another template, the placeholder shows unresolved. Bind a named placeholder instead.
Map array properties
To bindpeople into a modal array named reviewers with different field names:
label and email. Use them in modal content that accepts an array, such as a modal each directive. This mapping does not automatically add dropdown options unless the modal is configured to use that data.
Verify types and missing data
A missing source can leave its expression unresolved. Do not rely on
is_required alone as a runtime fallback. Validate a complete sample, a missing optional field, and an empty array, then open the actual modal in Slack.
Changing a template’s sample data does not change data stored with an already-sent message. Send a new test message after changing the binding source. Handle submission values.
