Skip to content

Add "Adaptive Card Refresh" solution (Universal Actions) under authoring/solutions - #533

Open
Monisha Monikantarajan (mmonisha) wants to merge 2 commits into
microsoft:mainfrom
mmonisha:solution/adaptive-card-refresh
Open

Add "Adaptive Card Refresh" solution (Universal Actions) under authoring/solutions#533
Monisha Monikantarajan (mmonisha) wants to merge 2 commits into
microsoft:mainfrom
mmonisha:solution/adaptive-card-refresh

Conversation

@mmonisha

Copy link
Copy Markdown

What this adds

A new importable Power Platform solution, Adaptive Card Refresh, under authoring/solutions/adaptive-card-refresh/. It demonstrates the Universal Actions pattern for refreshing/replacing an Adaptive Card after submission in Microsoft Teams, so a completed form can't be filled in or submitted twice.

The card's buttons use Action.Execute with a unique verb; a listener topic (CardListenerV2) catches the invoke activity, branches on the verb, and returns a replacement card that Teams swaps in place.

Authorship & attribution

This solution was originally authored by Nghiem Doan (@nghiemdoan-msft) (AdaptiveCardInCopilotStudio) and is contributed here with their blessing, under its original MIT license (preserved as LICENSE, copyright retained). I packaged it into the repo's PnP solution format for discoverability. Requesting Nghiem Doan (@nghiemdoan-msft) as reviewer to confirm.

Contents (PnP format)

  • README.md — overview, how-it-works, import steps, demo GIF
  • LICENSE — original MIT license (Copyright (c) 2023 Nghiem Doan)
  • solution/FeedbackAgent_1_0_0_5.zip — importable unmanaged solution
  • sourcecode/ — unpacked source (pac solution unpack)
  • assets/ — screenshots and demo GIF

Testing

  • Imported the solution into a Copilot Studio environment via make.powerapps.com > Solutions > Import.
  • Published the agent and added the Microsoft Teams channel.
  • Verified in Teams (not the test canvas) that submitting the card replaces it in place with the confirmation card, and resubmission is not possible.

Notes

  • Teams-specific: relies on the invoke/refresh flow of the Teams channel. Does not apply to the Microsoft 365 Copilot channel today.
  • The invoke response only fires in a published channel, so testing requires publishing the agent.

Related

…g/solutions
Packages the Universal Actions 'refresh after submit' pattern as an importable PnP-format solution. Original work by Nghiem Doan, included under its MIT license with attribution preserved.
Co-authored-by: Nghiem Doan <nghiemdoan@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c3114a7d-d5b3-44cf-a937-ba6c1adc4080
@mmonisha

Copy link
Copy Markdown
Author

cc Nghiem Doan (@nghiemdoan-msft) — this packages your Adaptive Card refresh sample (originally from https://github.com/nghiemdoan-msft/AdaptiveCardInCopilotStudio) into this repo, with your MIT license and attribution preserved and a Co-authored-by credit on the commit. Couldn't add you as a formal reviewer (not a repo collaborator), so tagging you here — could you confirm you're good with this contribution? Happy to adjust anything.

Remove the Microsoft365Copilot channel from the FeedbackAgent configuration (both the solution zip and unpacked source). The invoke/refresh Universal Actions flow is not supported in the Microsoft 365 Copilot channel today, so enabling it by default caused a silent failure on import/publish. Teams remains the only enabled channel; the README already documents the M365 Copilot limitation.
Co-authored-by: Nghiem Doan <nghiemdoan@microsoft.com>
@mmonisha

Copy link
Copy Markdown
Author

Update: shipped the agent as Teams-only.

Nghiem (the original author) flagged that the Microsoft 365 Copilot channel was enabled in the packaged agent, even though the invoke/refresh Universal Actions flow isn't supported there today. Enabling it by default would cause a silent failure on import/publish.

Fix (commit 58f2ec3):

  • Removed the Microsoft365Copilot channel from configuration.json in both the solution zip and the unpacked source. Teams remains the only enabled channel.
  • Kept the README note documenting the M365 Copilot limitation so the exclusion is explained.

Nghiem has reviewed the sample and is good with it as an example (she couldn't comment directly on the PR as a non-collaborator).

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@mmonisha