PowerAutomate, Adaptive Cards, and ICON

I figured out a way to hack together Microsoft Power Automate and Adaptive Cards with ICON to create clickable buttons in a Teams message to allow users to respond to messages similar to how Slack functions.



Thank you for sharing this, Iā€™m loving the potential here.

1 Like

Would you like to share what you did to make this happen?

Let me put together a write up and I will post something this week.

1 Like

Thank you! I will keep an eye out for it!

Building Buttons in Teams with Power Automate and InsightConnect

  1. Create a Power Automate workflow
    a. Trigger - Monitor Teams for Keyword
    b. Post an adaptive card and wait for a response
    c. Compose message with outputs from adaptive card (SubmitActionId)
    d. For Each Loop - Trigger outputs Body Value
    i. Reply with Message in Channel
    Outputs - Compose

  2. Create a Snippet in ICON
    a. Sleep 30 Seconds
    b. Check Reply Loop
    i. Teams - Get Reply List
    ii. Break Loop - is_defined(get reply.messages)
    c. Decision Loop
    i. Strip HTML from Teams Message
    ii. Automated Decision Step
    1. Strip HTML text matches = Output from Compose step in Power Automate

  3. In workflow that you want the buttons
    a. Send Teams message with Keyword
    b. Add Snippet
    c. Continue workflow

Design Adaptive Cards
Power Automate
Teams Adaptive Cards - Learn Microsoft
Create Engaging Messages With Adapative Cards
Get Started With Power Automate

1 Like

This is great. Thank you so much for sharing!

1 Like

Welcome, forgot to include the data flow for how everything works.

ICON workflow sends a keyword message to a channel that the Power Automate workflow is monitoring for the keyword, the Power Automate workflow then picks up the workflow and generates the adaptive card with the buttons and processes the button click. Power Automate then sends the response message based on the button click back to ICON, who picks up the response via the Get Reply List action in Teams and continues the workflow.


We use Teams like a chatbot with ICON Workflows, so a user types a message like a command and ICON will send the results back to Teams. Because the number of Workflows is growing people cannot always remember all the commands, I used an Adaptive card and PowerAutomate to also build a GUI menu that will generate these commands with the correct syntax.

That was the same idea that started me down this path. I have another workflow that uses Microsoft Forms and Power Automate to trigger a workflow to grant temporary system access. The completed form triggers a Power Automate workflow that outputs a Teams command in the proper syntax to trigger an ICON workflow, that schedules the access request.

We are replacing Slack for our SecOps team with Teams and that is their biggest complaint the lack of buttons in Teams vs Slack. So I came up with this solution.

1 Like