Mattermost interactive messages for approvals and requests in chat
Interactive messages are Mattermost integration posts that carry buttons, menus or form dialogs, so a reader can act on a request without leaving the channel. Teams add them when approvals, access requests or intake forms currently travel by email or a ticket queue and the approver already lives in Mattermost. The work has two halves: the Mattermost side, where the integration is configured and the message payload is defined, and a callback service your team must build, host and secure, because Mattermost sends each button press or dialog submission to an endpoint you control and expects a response back.
Before design starts, confirm the exact mechanics for the server version you run. Interactive message fields, dialog behavior, callback request format, and how Mattermost signs or authenticates callbacks are version-dependent, so check them against the documentation for that release rather than older examples or blog posts. The current release schedule and support windows are listed on the Mattermost server releases page, which also tells you when a server upgrade could change the behavior your callback depends on.
Decide early who may click which action, and where the authorization check lives. The callback service receives a user identity and an action context, but it must still verify that the person may approve the request against your own system of record, and it must reject replayed or forged callbacks. Ask the team building the service to document how each button maps to a state change, what happens when the same request is actioned twice, and how a failed callback is shown to the approver. Test these paths in a non-production team before any approval affects access or spending.
How a button click travels from chat to your service and back
The diagram starts when a user clicks a button or submits a dialog in a Mattermost post. The Mattermost server packages the action context and sends an HTTP POST to the integration's callback URL. Your callback service checks the request before it acts: it verifies the shared secret or token, confirms the user and the action, and then performs the business step, such as recording an approval in a ticketing or identity system. The service responds, and that response either updates the original post or returns an ephemeral message to the user. Confirm the exact payload field names and response options in the Mattermost integration docs before you build.
Generic illustration of an interactive message callback; confirm payload field names in the Mattermost docs.
What Mattermost interactive messages can do on a self-hosted server
Mattermost integrations can present buttons, menus and forms inside chat, then send the user's choice back to a service you run. The capabilities below cover the message elements, the dialog flow and the response behaviors that together decide what an approval or request workflow can do. Confirm each one against the integration documentation for the server version you plan to run before you design around it.
Action buttons on posts
Buttons attached to a bot or integration post let a user approve, reject or claim a request with one click. Each click sends a callback to a URL you control, so your service becomes the system that records the decision. Confirm in the docs for your server version how the callback is authenticated, what payload it carries, and how your service must reply within the time the server allows. Treat the callback URL and any integration token as secrets.
Select menus with options
Menus let a user pick one value from a list, such as a cost center, environment or ticket priority, without typing it. Menu options can be fixed in the message or loaded from your service, which matters when the list changes often or depends on who is asking. Confirm which menu types your version supports, whether options can be fetched dynamically, and how the selected value appears in the callback so your service can validate it.
Interactive dialogs opened from a trigger
A dialog is a form that opens in a pop-up from a button or slash command and collects several fields before submission. It suits requests that need structured data, such as access requests with a business justification and an end date. Confirm the field types, required-field handling, and how validation errors are returned to the form. Your service must check every submitted value again on its own side, because the form is not a security control.
Updating or replacing the original post
After an action, the post can be updated in place to show its new state, such as approved by a named manager, so the channel does not keep a stale request with live buttons. This keeps one record per request and reduces duplicate approvals. Confirm in your version's docs whether the update is done through the callback response or an API call, which fields can change, and who is allowed to edit a bot's post. Plan a fallback for requests that were already acted on.
Ephemeral responses for the acting user
Ephemeral responses are visible only to the user who triggered an action, which suits confirmations, error messages and instructions that should not clutter a shared channel. They are useful for telling a user that a request was rejected because of missing permissions. Confirm whether your version supports ephemeral replies from interactive actions, how long they remain visible, and whether they are stored in channel history, since this affects audit and retention planning.
Choosing between buttons, menus, dialogs, slash commands and a plugin
This table compares the five ways a team can add interaction to a Mattermost integration, from message buttons to a custom plugin. Read each row for when the option fits, what the callback service must provide, and who keeps it working through upgrades. The main takeaway is that the simplest option that meets the workflow usually carries the least upgrade risk.
| Option | When it fits | What the callback service needs | Who maintains it across upgrades |
|---|---|---|---|
| Buttons on an integration message | One-step responses such as approve, reject or acknowledge, with a fixed set of outcomes | A public HTTP endpoint that receives the action, verifies the request and returns an updated message | Your integration team, since the callback code is yours and Mattermost only relays the action |
| Menus on an integration message | Choosing one value from a known list, such as an environment, priority or on-call group | An endpoint that serves option lists if the choices are dynamic, plus the same verification and response handling as buttons | Your integration team, with checks after upgrades to confirm the menu payload still behaves as expected |
| Interactive dialogs | Multi-field requests such as access requests, change tickets or incident intake that need validation | A dialog submission handler that validates fields, returns errors to the form and creates the downstream record | Your integration team, and it should be retested whenever the dialog flow or Mattermost version changes |
| Slash commands | User-typed requests where people start the action themselves, such as status lookups or quick requests | An endpoint that parses the typed text, verifies the token and returns a response type suited to the channel | Your integration team, see the sibling topic on custom slash commands for request and token detail |
| Custom plugin | Logic that must run inside Mattermost, such as custom UI, server hooks or behavior that external callbacks cannot reach | Plugin code built against the plugin API, plus a test plan for each new monthly server release | Your plugin owner, who rebuilds and retests on each upgrade, see the sibling topic on building a custom plugin |
Securing the callback so only Mattermost can trigger actions
The trust boundary in an interactive message sits between the Mattermost server and your callback service. When a user clicks a button or submits a dialog, Mattermost sends an HTTP POST to the URL you configured, and your service must treat that request as untrusted until it proves it came from the integration you created. Confirm how the current Mattermost integration docs describe request verification for buttons and dialogs in your version, since the mechanism is a token or shared secret included in the payload, and check that your service compares it against the value stored for that specific integration. Your service should reject requests with missing or mismatched tokens before reading any business fields, and log rejections for review.
Treat the integration token and any signing secret as credentials. Store them in your secrets manager, not in chat, source repositories or plain configuration files, and rotate them when staff who administered the integration leave. Limit who can create or edit interactive message integrations, since anyone who can register a callback URL can receive user action data and the tokens that protect it. Confirm which system roles can enable integrations in your deployment and whether your organization wants bot accounts, rather than personal accounts, to own the integration. Also decide whether callback URLs may point to internal addresses. Mattermost restricts outbound connections to internal networks by default, and enabling exceptions is a server setting that you should confirm by name in the documentation for your version before changing it, then limit to specific hosts rather than open ranges.
Design the callback handler to be idempotent. Users click twice, networks retry and browsers resubmit forms, so an approval request must carry a unique request identifier from your own system and your service must record which identifiers it has already processed inside the same transaction that applies the change. A repeated click should return the original outcome and not approve the request again or send a second downstream payment or access grant. Test this explicitly by replaying a captured callback and by sending two near-simultaneous clicks, because a check that only runs sequentially will pass while the race condition remains.
How an interactive message integration moves from design to production
The sequence turns a chat-based approval or request flow into a callback service that has been tested on failure paths, piloted with one team, and handed over with a runbook.
Agree the workflow and its data
Map the approval or request flow with the process owner, the approvers, and the systems of record it reads from and writes to. Record which fields an approver must see before deciding, which actions are allowed at each state, who may act, and how long a request stays open. Confirm with security and compliance which data may appear in a chat message, since channel members and retention settings apply to every message the integration posts. The output is a workflow map and a data inventory signed off by the process owner.
Specify the message and dialog payloads
Turn the workflow map into a payload specification: the message text, attachments, each button and menu with its action identifier, and the fields in each dialog with their types and validation rules. Define the state each action moves a request into and the response the callback must return to update the original post. Keep identifiers opaque so that a button cannot reveal internal record numbers. Confirm the exact payload fields and dialog behavior against the Mattermost version you run, because they are specified in the integration documentation for that release. The output is a versioned payload specification that developers and reviewers can test against.
Build and verify the callback service
Build the service that receives action and dialog submissions, checks each request before acting on it, updates the system of record, and returns the response Mattermost expects. Verification must confirm the shared secret or token on every callback, reject requests that reference unknown or closed items, and make each state change idempotent so a repeated click has no second effect. Run the service against a non-production Mattermost server with test users and test channels. The output is a callback service with automated tests and a record of the test runs.
Configure the integration and its permissions
Enable the integration features on the non-production server and create the bot account or integration identity the service will post under. Scope the bot to the channels and teams it needs, and restrict who can create or administer the integration. Store the callback secret in your secrets manager rather than in the integration settings page or source control. Check that the callback URL is reachable from the Mattermost server and not from the public internet unless your design requires it. The output is a configuration record that lists each setting, its owner, and the reason for it.
Test the failure paths
Test the cases that cause most production incidents: an expired request whose buttons are still visible, a double click on an approve button, a callback service outage during an approval, a dialog submitted with invalid or missing fields, and a user who is in the channel but is not an approver. Each case should have an expected result written before the test runs, such as a clear message to the user and no change to the record. Include a retry test to confirm that a delayed response does not produce a duplicate state change. The output is a failure-path test report with defects logged and retested.
Pilot with one team
Run the integration with one team on live but low-risk requests for a set period agreed with the process owner. Watch for unclear button labels, requests that stall, approvers who act outside the channel, and load that the callback service did not handle in testing. Collect feedback from approvers and the people who file requests, and log every defect against the payload specification or the callback code. Close the pilot only when the process owner and the security reviewer have both signed off the results. The output is a signed-off pilot report with the change list it produced.
Promote to production and hand over
Promote the configuration and the callback service to production through the same change process used for other systems, with the secrets created in production and never copied from the test environment. Check the production integration with a controlled test request before opening it to all users. Hand over a runbook that covers rotating the callback secret, disabling the integration, responding to a callback outage, and reviewing who can create or change actions. The output is a production deployment record and a runbook accepted by the team that will operate it.
What drives the effort and cost of an interactive integration
This table lists the factors that raise or lower the effort of building interactive messages and dialogs, with what each one changes in the build and what to ask for in a quote. Read the one-time rows as build costs and the recurring rows as the ongoing cost of keeping the integration working after Mattermost releases, dependency updates and support needs.
| Driver | Why it changes effort or cost | What to ask for in a quote |
|---|---|---|
| Number of actions and dialogs | Each button, menu and form needs its own request handling, validation, error messages and test cases, so effort grows with the count of distinct interactions. | A list of each action and dialog with its inputs, outcomes and failure behavior, priced per item or as a bounded set. |
| Systems the callback must update | Each system the callback writes to (identity, ticketing, HR, finance) adds an API client, credential handling, field mapping and a reconciliation path for partial failures. | The named systems, the write operations for each, and who provides test accounts and API documentation. |
| Authorization model for approvals | Deciding who may approve which request, including delegation, separation of duties and checks against the source system at click time, is design work that usually takes more effort than the button itself. | A written approval matrix and confirmation of where the authoritative permission data lives. |
| Audit records for each decision | Recording who acted, what they saw, the time, the request version and the result needs a defined log format, storage location and retention rule. | The fields the audit record must hold, retention period set by your policy, and where records are stored and reviewed. |
| Number of server environments | Each environment (test, staging, production, air-gapped copies) needs its own app registration, callback URL, secrets and deployment steps. | Confirmation of how many environments exist and whether configuration is templated or set by hand. |
| Upgrade cycles after monthly releases | Mattermost publishes a new server version monthly, and interactive behavior should be retested against each release you adopt, so this is a recurring cost tied to your upgrade policy. | Whether support covers retesting on every release or only on Extended Support Releases, and how many test cycles are included per year. |
| Existing callback service to extend | Extending a service that already handles signed requests, logging and deployment is less work than building a new callback endpoint with its own security controls. | An inventory of the current service, its language and framework, and whether it already verifies requests and writes logs. |
How interactive messages connect to the rest of your Mattermost estate
An interactive message is not a standalone feature. It depends on the webhooks, commands, bot identity, API lookups, identity provider and server-side logic around it. Each connection below names what the flow relies on and what to confirm before you build.
Incoming webhooks post the request
The request message that carries the buttons or menu is usually posted into a channel through an incoming webhook. Whoever creates the webhook controls which channel receives requests, and the webhook URL works as a credential, so anyone holding it can post as that integration. Confirm who may create incoming webhooks on your server, where the URL is stored, and whether the message payload supports the interactive elements you plan to use in the sibling topic on interactive messages.
Mattermost SAML docsSlash commands start the request
Many approval flows begin when someone types a command such as a request command in a channel. The command's HTTP request reaches your service, which validates the token and returns the first interactive message. Confirm how the command is enabled for non-admin users, how request verification tokens are issued and rotated, and what response types your service returns in the sibling topic on custom slash commands.
Bot accounts act with a stable identity
Button actions and follow-up posts should run under a bot account rather than a personal account, so the flow keeps working when the employee who set it up leaves. Bots also determine which channels and direct messages the integration can post into. Confirm the bot's team and channel membership, its posting rights in private channels, and how its access token is stored, using the sibling topic on bot accounts and personal access tokens.
REST API resolves users and channels
Dialogs often need to look up a requester's manager, a team, or a channel ID before posting. Those lookups run through the v4 REST API with a bot or personal access token. Confirm which fields your flow needs, the permissions the token holds, and how your service handles users who are deactivated between the request and the approval. The sibling topic on automating Mattermost with the REST API covers the calls and token setup.
Identity providers decide who may approve
A button click proves only that a Mattermost user pressed it, not that the user is authorized to approve the request. Your service should map the Mattermost user to an identity in your directory and check group or role membership before acting. Confirm which identity provider backs your Mattermost sign-in, whether AD/LDAP user sync is enabled on your plan, and that deprovisioned users cannot approve. The authentication and SSO group covers the provider options.
Plugins run logic inside the server
If approval logic needs shared state, scheduled expiry of pending requests, or a guaranteed single execution across nodes, it may belong in a plugin rather than an external service. Plugins run inside the server and need their own testing against monthly releases. On a high availability cluster, background jobs and plugin storage must behave correctly on every node. Confirm the plugin route with the sibling topics on building plugins and running plugins in high availability clusters before choosing where state lives.
High availability docsQuestions teams ask before building interactive Mattermost integrations
How much effort does a Mattermost interactive message integration take to build?
Effort depends mostly on how many actions and dialogs the integration needs, how many systems the callback must update, and how much approval logic sits behind each button. A single approve or deny button that updates one ticket is a small build. A request form with conditional fields, role checks, audit records and updates to several systems is a larger one. Other drivers include how the existing approval system exposes its API, whether the callback must verify requests before acting, and how much testing is needed across channels, threads and mobile clients. No effort figure is given here. A written scope listing actions, dialogs, systems touched and test cases is what makes an estimate meaningful.
How long does an interactive integration take from start to production?
Timeline is set by the number of approval flows, the readiness of the target systems and the review steps your organization requires before a bot or app goes live. Teams often lose time waiting for a bot account, an admin decision on who may install integrations, or a security review of the callback endpoint. Access to a test Mattermost server and a staging copy of the approval system also shapes the schedule. No duration is given without a written scope and a list of dependencies agreed with your team.
What does our team need to provide for the integration build?
Three roles matter most. Mattermost administrators decide where the integration may be enabled, which teams and channels it reaches, and whether non-admin users can use it. The identity owner confirms which accounts may act on requests, how approvers are matched to Mattermost users and how departures are handled. The owner of the approval system provides API access, documents the states a request can move through and confirms which actions are allowed to change records. Your team should also name a contact who can review the callback design and approve the test plan.
Can our internal team build interactive Mattermost integrations without a partner?
Yes, if the team has engineers who can write an HTTP service, handle signed or token-verified requests, and work with the approval system's API. The main risks are not in the first working button. They appear in the edge cases: duplicate clicks, expired messages, users who lose permission between the post and the click, and retries when the callback times out. An internal team should plan for code review of those paths, test coverage that includes failure modes, and ownership of the service after launch. DeployOpen plans, implements and documents this work in infrastructure you control when a fixed scope is agreed in writing.
How do Mattermost upgrades affect an interactive integration?
Mattermost releases a new server version in binary form on the 16th of each month, so an integration will see server upgrades regularly. Check the release notes for each version that touches interactive messages, dialogs, bots or the API your integration calls. Keep a staging server on the same version as production, and run a fixed set of test actions after each upgrade. Plan the upgrade window with the Mattermost administrators, since a server change can alter behavior your callback depends on. The current support windows for each release should be confirmed on the Mattermost server releases page before the upgrade calendar is set.
What happens to approvals when the callback service is down?
Design for it before launch. When the callback service does not respond, the button in the message may appear to do nothing, so the user needs a clear signal and a fallback path. Common patterns include queuing the action for later processing, showing a status message in the thread, and giving approvers a link to the approval system so they can act there. The callback should be idempotent, so a retried click does not approve a request twice. Monitoring should alert the service owner when callbacks fail. Ask for a written failure runbook covering who is notified, how queued actions are replayed and how the audit trail records what happened.
How should callback requests be secured so only legitimate actions run?
Each action request from Mattermost should be verified before the service changes any record. Confirm the token or signature the integration is configured to send, check that the acting user is still permitted to approve the item, and reject requests for items already closed. Store secrets outside source code and restrict who can view the integration settings. Log every action with the user, the item and the outcome so audit reviewers can trace an approval. Review these controls with your security team, and confirm the exact verification options available in your Mattermost version in the integrations documentation.
How DeployOpen scopes and delivers interactive Mattermost integrations
DeployOpen treats interactive messages and dialogs as a small integration with its own security and upgrade concerns. We agree the scope in writing, build the action callback service inside your infrastructure, test it against your self-hosted Mattermost, and hand over the code and runbook. Ongoing support is available as a retainer.
How we scope
- Written scope lists each button, menu and dialog, and the business workflow it supports.
- Scope records which Mattermost server and integration endpoints the callbacks must reach.
- Scope names who approves changes to action payloads and who owns the callback service.
How we build
- Build the callback service inside your network with request verification on every action.
- Map each action to a stored, versioned payload so dialogs stay consistent across releases.
- Test dialog validation, error responses and timeouts against your Mattermost test instance.
How we hand over
- Deliver source code, configuration, and secrets handling notes for the callback service.
- Provide a runbook covering action failures, token rotation and how to add a new workflow.
- Walk your platform and security teams through the test results and open risks before close.
How we support
- Retest interactive flows when you plan a Mattermost server upgrade, including ESR and monthly releases.
- Review callback logs and failed actions with your operations team during agreed support windows.
- Offer ongoing support and continuous testing as a retainer after the fixed-scope delivery.

