Power Dynamics
  • Power Dynamics
  • 🍕My name
  • D365 CE
    • Copilot
      • 🥐Add Copilot into Rich Text Control
    • Sales
      • Copilot in D365 Sales
      • Export record to PDF
    • Customer Experience
      • Contact Center (Omnichannel)
        • 🐚Internal Live Chat in MDA
        • 📢Add Chat Widget to Power Pages - Proactive Chat
      • Attachment Control
      • Case Routing: Basic Routing rule set
      • Custom SLA for any Entity
      • Customer Insight
        • Journey - Custom Trigger - Call Power Automate
    • Field Service
  • Power Platform
    • Analytics
    • Dataverse
      • Use case for the feature of Record ownership across Business Unit
      • 💡Workaround: Change the OOB "Exchange Rate" of a record
      • Using a Virtual Entity to store historical log (sample)
      • Disable Empty Address record
      • Using Adaptive card
      • Block Unmanaged Customizations
      • 🪃Recycle Bin on Dataverse (Preview)
    • Model Driven App
      • 💡Run SSRS report on MDA mobile
      • 💡Tip: Create a Security Role with "App Opener" minimum privileges
      • Tag @person to notify in MDA
      • Auto search on the Lookup field
      • Activities with multiple related records
      • Embedded Power BI - Dashboard
      • Embedded Power BI - Form
      • "Custom Help" - Is it help?
      • New modern Command Bar
      • Tip: Hide the button "Add Existing Record" on subgrid
      • Custom Page - Why not?
      • Hiding sensitive column data
    • Canvas App
    • Fabric & Power BI
      • New Text slicer
      • Dataverse link to Microsoft Fabric
      • 💡Leveraging Interactive Warehouse Floor Maps in Power BI
      • Calculation Group for Time Intelligence
    • Power Automate
      • ✅Sequential Approval
      • 📤Create an Appointment by Outlook Graph API
      • Dowload SSRS Report and Send email
      • Power Automate: Add a table in Email
      • 💡Tips: Get "DisplayName" of the Lookup field on Power Automate
      • E-sign: Power Automate & DocuSign
  • D365 Finance & Operation
    • General
      • 🇻🇳D365 FnO - Virtual entities: Use case
    • Finance
      • Consolidating Customer & Vendor Balances
    • Supply Chain
      • Landed Cost Series
        • Landed Cost- Essential Configuration
        • Landed Cost Scenarios 1
Powered by GitBook
On this page
  • My propose
  • 1. Building an Adaptive Card
  • 2. Creating the Power Automate
  • 2.1 Create Power Automate with the action "Post card in a chat..."
  • 2.2 Edit the Adaptive Card's JSON code
  • 2.3 My sample Flow:
  • 3. Check-now
  • Tips: Use ChatGPT to gen the JSON code for the Adaptive Card

Was this helpful?

  1. Power Platform
  2. Dataverse

Using Adaptive card

#AdaptiveCard, #MDA, #PowerAutomate, #Teams, #Notification

PreviousDisable Empty Address recordNextBlock Unmanaged Customizations

Last updated 1 year ago

Was this helpful?

Greetings everyone,

Following a conversation with my client regarding Approval Notifications, it has been determined that they would like to receive notifications in their MS Teams chat whenever a record is approved.

In my case, the client has a Deal entity and it has been configured as the Approval Flow. The user requested that: When their Deal has been approved, they will receive a notification about this event in the Team chat.

... and I propose to use Power Automate to send an Adaptive Card to the record owner once it is approved in MS Teams.

My propose

1. Building an Adaptive Card

Okay ... I have attached the JSON code for this card below. You can try it out.

My sample card - JSON
Sample code
{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.3",
    "body": [
        {
            "type": "TextBlock",
            "text": "Your Deal has been Approved",
            "size": "Large",
            "weight": "Bolder"
        },
        {
            "type": "TextBlock",
            "text": "Deal: [Name]"
        },
        {
            "type": "TextBlock",
            "text": "Customer: [Customer Name]}"
        },
        {
            "type": "TextBlock",
            "text": "Est. Amount: [EstAmount]"
        },
        {
            "type": "TextBlock",
            "text": "Approver: [ApproverName]",
            "wrap": true,
            "weight": "Bolder"
        },
        {
            "type": "TextBlock",
            "text": "Approval Date:[ApprovalDate]",
            "wrap": true,
            "weight": "Bolder"
        },
        {
            "type": "ActionSet",
            "actions": [
                {
                    "type": "Action.OpenUrl",
                    "title": "Open Record",
                    "url": "[Link]"
                }
            ]
        }
    ]
}

2. Creating the Power Automate

After finishing the Adaptive Card, I jumped to my solution and created a Cloud flow to send the Adaptive card to Deal Owner once it is approved in MS Teams.

2.1 Create Power Automate with the action "Post card in a chat..."

The action name: Post card in a chat or channel. Following the configure:

  • Post as: Flow bot

  • Post in: Chat with Flow chat

  • Recipient: Owner of record who receive the notification

  • Adaptive Card: input the JSON code of the card which was built from the Adaptive Carder designer tool.

2.2 Edit the Adaptive Card's JSON code

After entering the JSON code into the Flow, I will modify the JSON's Placeholder with the Dynamics value from the record in the Flow.

2.3 My sample Flow:

3. Check-now

I will change the Status Reason of the Deal record to "Approved". Then, the Adaptive Card is sent to the Owner of the Deal in MS Teams.


Tips: Use ChatGPT to gen the JSON code for the Adaptive Card

Besides using the Adaptive Card Designer, I requested help from the ChatGPT to generate the JSON code for a sample Adaptive card.

Let's try it yourself...

For building an Adaptive card that shows messages in MS Teams, I used the tool - . And my sample:

I will not talk in detail about the components of this tool today, but I believe you can grasp and comprehend it swiftly... That is my promise.

For more details, you can find the

Thank you and hoping well... [NTD]yns.asia ... Thank you.

😇
😍
Adaptive Cards designer
Designing Adaptive Cards for your Microsoft Teams app
🎉
☕
❤️
invite me a cup.
Simple Steps
Adaptive Card supporting framework
My adaptive card design
Create flow and action
Edit Adaptive Card's JSON code
Testing Adaptive Card posted in MS Teams chat
Use ChatGPT to generate Adaptive Card - Json code
Page cover image