Add follow-up question support to Teams request action#2398
Merged
ravikiranvm merged 3 commits intoJul 15, 2026
Conversation
Buttons on the Microsoft Teams Request Action message can now optionally ask the recipient a follow-up question in the browser before the workflow resumes. The typed answer is validated by format (text/email/number) and surfaced in the step output as parameters.answer; an optional no-answer choice resumes with an empty answer. Buttons without a follow-up question behave exactly as before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds opt-in “follow-up question” support to the Microsoft Teams Request Action block by routing selected button clicks through a new collect_input.html page that gathers/validates an answer and then resumes the flow run, surfacing non-routing resume query params under parameters in step output.
Changes:
- Introduces
collect_input.htmland abuildWrapperUrl()helper to generate either the existing resume wrapper URL or the new input-collection URL. - Extends Teams action/button types and the Request Action action props to include follow-up question + answer format + no-answer option.
- Updates resume handling to expose extra resume query params as
parameters(excluding routing and prototype-pollution keys), with new unit tests.
Blocking
collect_input.htmlrejects valid resume URLs generated by the platform due to an overly strict path regex and origin check (breaks follow-up-question flow in common configurations).
Non-blocking
- Number validation currently treats
Infinityas valid numeric input.
Merge recommendation
- Do not merge
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react-ui/public/html/collect_input.html | New static page to collect/validate an answer and resume the flow run with answer query param. |
| packages/blocks/microsoft-teams/src/lib/common/build-wrapper-url.ts | New helper to build wrapper URLs for either resume-only or follow-up-question flows. |
| packages/blocks/microsoft-teams/src/lib/actions/request-action-message.ts | Adds new optional props per button and uses buildWrapperUrl() when generating button URLs. |
| packages/blocks/microsoft-teams/src/lib/common/on-action-received.ts | Surfaces non-routing resume query params as parameters and excludes prototype-pollution keys. |
| packages/blocks/microsoft-teams/src/lib/common/generate-message-with-buttons.ts | Extends Teams action type to carry follow-up-related optional fields. |
| packages/blocks/microsoft-teams/test/build-wrapper-url.test.ts | New unit tests covering wrapper URL generation for follow-up options. |
| packages/blocks/microsoft-teams/test/on-action-received.test.ts | Updates/extends tests to assert parameters passthrough and pollution-key exclusion. |
Comment on lines
+192
to
+197
| const url = new URL(value); | ||
| const isSameOrigin = url.origin === window.location.origin; | ||
| if (!isSameOrigin || !RESUME_PATH_REGEX.test(url.pathname)) { | ||
| return null; | ||
| } | ||
| return url; |
Use a null-prototype object in the prototype-pollution test so suspicious keys are own properties, matching how query strings are parsed at runtime, and validate number answers with Number.isFinite to reject infinities. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same own-property semantics, but unambiguous to static analysis. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
MarceloRGonc
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Part of OPS-4626
Adds an opt-in "follow-up question" capability to the Microsoft Teams Request Action block: any action button can now ask the person a question in the browser before the workflow resumes, and the workflow receives the typed answer.
What's new
parameters.answer(all non-routing resume query params are exposed underparameters)collect_input.htmlrenders the question (with the card header as the page title), validates the answer, and fires the existing flow-run resume URL with the answer appendedWhy
Teams Adaptive Cards sent via the Graph API support only
Action.OpenUrl— collecting typed input natively (Action.Submit/Action.Execute/ dialogs) requires a bot or Teams app installed in the tenant. This rides the existing capability-URL button mechanism instead: no new permissions, no new endpoints.Example use case: a notification recipient reports "I'm not the owner of this resource" and provides the correct owner's email, which the workflow then acts on.
Safety
parameters)parameters