web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / MS Teams ignoring $dat...
Power Automate
Unanswered

MS Teams ignoring $data when inlining data in adaptive card v1.2

(0) ShareShare
ReportReport
Posted on by 4
Hi,
 
I Would like to run a basic flow:
When a Teams webhook request is received -> Post adaptive card in Channel (as Flow bot).
The adaptive card json as shown in debug is as seen below, with the $data field, as stipulated here : Option A https://learn.microsoft.com/en-us/adaptive-cards/templating/language#providing-the-data
 
This works if tested with the designer: https://adaptivecards.io/designer/
{
    "type": "AdaptiveCard",
    "$data": {"region":"global","state":"up","since":1722444550,"job_document":{"_id":"66","name":"HTTPS_mymonitor","policy":"all","status":{"ams":{"status":"down","since":1722442912,"fail_set":["http job error: timeout: Get \"https://xxxxx.com/yyyy\": i/o timeout"],"notification_sent_ts":"0001-01-01T00:00:00Z"},"global":{"status":"down","since":1722442940,"fail_set":["ams","lhr"],"notification_sent_ts":"1970-01-01T00:00:00Z"},"lhr":{"status":"down","since":1722442940,"fail_set":["http job error: timeout: Get \"https://zzzz.com/qqq\": i/o timeout"],"notification_sent_ts":"0001-01-01T00:00:00Z"}},"active":true,"regions":["lhr","ams"],"region_scope":"","job_type":"http","frequency":60,"config":{"port":0,"connect_timeout":5,"response_timeout":0,"idle_timeout":3,"url":"https://sthing/kl","method":"GET","user_agent":" HTTP Monitoring Job","authorization":"","virtual_host":"","tls_skip_verify":true,"tls_add_verify":false,"follow_redirect":false},"rules":null,"rapid_recheck":true,"notify_list":"645a3bb5339dde007d3c7b07","mute":false,"notify_regional":false,"notify_failback":true,"notify_delay":0,"notify_repeat":0,"notes":"","notification_sent_ts":"2024-07-31T16:22:20.232802Z"}},
    "body": [
        {
            "type": "TextBlock",
            "size": "medium",
            "weight": "bolder",
            "text": "Monitor DOWN - ${replaceIgnoreCase(job_document.name, 'https_', '')}",
            "color": "attention",
            "$when": "${state == 'down'}"
        },
        {
            "type": "TextBlock",
            "size": "medium",
            "weight": "bolder",
            "text": "Monitor up - ${replaceIgnoreCase(job_document.name, 'https_', '')}",
            "color": "good",
            "$when": "${state == 'up'}"
        },
        {
            "type": "FactSet",
            "facts": [
                {
                    "title": "Since",
                    "value": "${formatEpoch(since, 'HH:mm - MMM dd')}"
                },
               {
                    "title": "AMS_failure",
                    "value": "${join(job_document.status.ams.fail_set, '\n\n')}",
                    "$when": "${empty(job_document.status.ams.fail_set) == false}"
                },
                {
                    "title": "LDN_failure",
                    "value": "${join(job_document.status.lhr.fail_set, '\n\n')}",
                    "$when": "${empty(job_document.status.lhr.fail_set) == false}"
                }
            ]
        }
    ],
    "actions": [
        {
            "type": "Action.OpenUrl",
            "title": "View",
            "url": "https://montoring.com/jobs/${job_document._id}"
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.2"
}
 
How can I have Teams interpreting the $data field?
Thanks
Categories:
I have the same question (0)
  • FB-31071729-0 Profile Picture
    4 on at
    I just tried to prefix all my variables if $data. but it does not work
  • FB-31071729-0 Profile Picture
    4 on at
    New test but to no avail: I added an intermediate step 'initialize variable' where I set my new var to the part of interest froom the payload received from the 1st step. It does not change anything.
     
     
    I think the inlining simply is not working in MSTeams.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard