Introduction
Hi guys, let's try to explore a beautiful scheduled flow which can send daily shift timing end to MS Teams user accounts using the adaptive card concept via JSON programming.
Prerequisites
- Min. E3 account in Microsoft 365 to have access in flow.microsoft.com
- Min. knowledge of building flows covering all concepts like triggers, actions, conditions, types of flows, etc.
Go to flow.microsoft.com to sign in >> go to left navigation menu >> + create >> select a scheduled flow >> give a flow name >>
give the daily repition option as 1 day >> click create.
Your new flow is created with the above-selected trigger.
Now start filling the Teams user account details as shown below by adding the actions as shown below with the relevant information, as explained in the below screenshots:
Use the below JSON code for sending a No Response required title based no action required button to send a Goodbye message to all the MS Teams User accounts.
- {
- "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
- "type": "AdaptiveCard",
- "version": "1.2",
- "body": [{
- "type": "TextBlock",
- "text": "No Response Required",
- "weight": "bolder",
- "size": "large"
- }, {
- "type": "TextBlock",
- "text": "Automated Sign Off Message",
- "size": "medium"
- }],
- "actions": [{
- "type": "Action.ShowCard",
- "title": "Good Night Mate!",
- "card": {
- "type": "AdaptiveCard",
- "body": [{
- "type": "Input.Text",
- "id": "comment",
- "isMultiline": true,
- "placeholder": "Enter your comment"
- }],
- "actions": [{
- "type": "Action.Submit",
- "title": "OK"
- }]
- }
- }]
- }
Repeat the above same process for one more Teams user account so that he/she also can receive a similar MS Teams adaptive card message via JSON using a Power Automation flow.
As per the above flow, it triggers an adaptive card message to the MS Teams user account, as per the scheduled time shown below:
Note
Above, post your own adaptive card as the flow bot to a user action has a limitation as it can only send an adaptive card message only to a single MS Teams user account. Hence, I created the same action twice for triggering two MS Teams user accounts.
Limitations
It has to be turned off on weekends to avoid unnecessary emails triggering and needs to be turned on Monday again.
Image signature can't be included using HTML coding or HRef tagging etc. as it's not supported currently but can do some configuration in the JSON for the next level of adaptive card messaging.
Finally, we have developed a daily mail triggering flow with an afternoon shift timings ending message to all the ms teams user accounts, establishing a quick timely notification with a cool greeting via an adaptive card mechanism.
Cheers!!