Post Teams Notification OR Personalized Message to Selected User

Microsoft has launched the common data service environment with Power Platform. The Microsoft Power Platform comprises of 4 components: Power BI, Power Automate, Power Virtual Agents and Power Apps. These incredible components permit you to automate measures, fabricate solutions, and investigate information.

In this blog, we will demonstrate the integration between Microsoft Dynamics 365 and Microsoft Teams. It will gives the complete idea about how we can send the personalized Teams message to user directly when there is any change on Dynamics 365 record without any common Team.

Personalized Adaptive Card

Lets start with example, when "Case" is assigned to some other user via Dynamics 365 then it will send message to Assigned User regarding new case assignment

Power Automate provides an direct step "Post Message (V3) Preview", but it will post a message to any Team & Its related Channel on Teams. Using these step we can not send message to Particular user directly. 

We will demonstrate a way to send direct message to user via personalized adaptive message card.

Step 1:
Create Automated Cloud Flow. Choose Trigger point as "When a row is added, modified or deleted". Fill out the related information for trigger point.


Step 2:
Get the New Owner information via "Get Record" Step, This step will get a primary email address and Full name of the team user from an associated entity, which is used in the next step. 


Step 3:
To Post Message in Teams, there are multiple options available - please select one as per the requirement. 

Example 1: 
Post a message as the Flow bot to a user



Here, add the related information. Main thing which needs your attention is - Message Formatting.
For Team's message formatting there are few different ways to style your message. Below table shows some example - 

Text Style

Markdown

Bold

**Bold**

Italic

_Italic_

Bullet list

- Item 1\r- Item 2\r- Item 3

Numbered list

1. Green\r2. Orange\r3. Blue

Hyperlinks

[Title](url)

              **Text** will be displayed Text as Bold.

Result:


Example 2: 
Post your adaptive card as Flow bot to a user


Here, we have used Adaptive Cards for sending message, we can create an user friendly cards by designing custom adaptive cards. It contains JSON object of adaptive card. We can create/customize the cards at https://adaptivecards.io/.

Using https://adaptivecards.io, we will design own Adaptive card, use that Card payload editor JSON as a message and set dynamics values in it.

Once we get the JSON object for adaptive cards, replace test values by Entity's dynamic values. On "More Info" button set the URL of related record. 



Result:


References :
Adaptive Card Designer - https://adaptivecards.io/
                                                https://www.youtube.com/watch?v=IYihxmGCbMg

Congratulations!

You have effectively set up a automate Microsoft Teams notification utilizing Power Automate streams. 

There are numerous approaches to automate your work processes all through Microsoft Teams and the full Office 365 suite utilizing Power Automate streams. Take a stab at redoing your streams further by adding "conditions" and other remarkable triggers and activities.

Comments