Automatically sending Power Apps cards to Microsoft Teams channels using Power Automate Flow

By | May 9, 2023

Microsoft has added a new feature called Cards in the Wave 2 release.  Cards are simplified forms that are connected to Dataverse which can be sent to CRM users to capture the required details. In the previous blog, we explained how to create cards using Power Apps.

In this blog, we have explained how to send these cards to the Microsoft Teams channel using Power Automate Flow. We have taken an example where we automate the process of sending an employee information Card when a custom entity employee record gets created.

Microsoft introduced new connector in the power automate flow named as Cards for Power Apps.

Power Automate Flow

This connector is used to create or get card instances with the input variables, and it will return the dynamic content of the card instance.

  • Create card instance (preview): This will help us to create a card instance of a specific card that we have created in our solution. We can also send input parameter values through this card instance. This card instance will return the dynamic content of the card.
  • Get the card description (preview): This will help us get information about the card like ID, name, description, author, etc.

Microsoft Power Platform

You can follow the below steps to create Power Automate Flow to send cards to the Microsoft Teams channel.

Step 1: Sign in to PowerAutomate using your credentials and select your environment.

Power Automate Flow

Step 2: Click on My Flows >> New Flow >> Automated Cloud Flow.

Power Automate Flow

Step 3: Give the name and choose the flow’s trigger.

Power Automate Flow

Step 4: Set the trigger. In the example screenshot below, the trigger is when a new custom employee record is created.

Power Automate Flow

Step 5: In new step, search for Cards for Power Apps, then click on Expand button.

Step 6: Select Cards for Power Apps.

Power Automate Flow

Step 7:  Select Create Card Instance (preview).

Power Automate Flow

Step 8: Select the card that you want to send. Set the body input variable. In this example, we set the Account Name value of the newly created account record.

Power Automate Flow

Step 9: In the next step, search for Microsoft Teams connector and select the action as Post Card as a chat or channel.

Power Automate Flow

 

Step 10: Set the Power Apps (Preview) in Post as field, and set Channel in Post in field. You can select your team and channel from the dropdown. After that, set the card instance that we created in the earlier step.

Power Automate Flow

After this power automation flow gets created, it will be triggered when the new employee record gets created, and the card will be sent to the Microsoft Teams channel as shown in the below screenshot.

Power Automate Flow

Conclusion

Thus, in the above blog, we learned how to send Cards to Microsoft Teams channel by using Power Automate Flow.