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 / Adaptive Card Issue - ...
Power Automate
Answered

Adaptive Card Issue - How to use dynamic size choice set from JSON

(0) ShareShare
ReportReport
Posted on by 7

Hi I have an automation that reads in a csv and converts it to JSON for easy manipulation. The csv is full of user subscription data. The goal is to send the users an email asking if they use their subscriptions and I've gotten the automation to work, except that it sends a separate email for each one. Idealy I'd like to create an adaptive card with all the subscriptions for a given user that asks if each one is in use. I've created the adaptive card and gotten it to display correctly on adaptivecards.io but cannot get it to display correctly in the actual automation. What am I doing wrong?

 

Here's the JSON for my card:
{
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"style": "emphasis",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": "**Which Subscriptions Aren't Needed?**",
"style": "heading",
"wrap": true
}
],
"width": "stretch"
}
]
}
],
"bleed": true
},
{
"type": "Container",
"spacing": "Large",
"style": "emphasis",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"weight": "Bolder",
"text": "SUBSCRIPTION",
"wrap": true
}
],
"width": "stretch"
},
{
"type": "Column",
"spacing": "Large",
"items": [
{
"type": "TextBlock",
"weight": "Bolder",
"text": "DEPARTMENT",
"wrap": true
}
],
"width": "auto"
},
{
"type": "Column",
"spacing": "Large",
"items": [
{
"type": "TextBlock",
"weight": "Bolder",
"text": "Subscription Used?",
"wrap": true
}
],
"width": "auto"
}
]
}
],
"bleed": true,
"$data": "${userSub}"
},
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "${subscription}",
"wrap": true,
"id": "subscription"
}
],
"width": 1
},
{
"type": "Column",
"spacing": "Medium",
"items": [
{
"type": "TextBlock",
"text": "${department}",
"wrap": true
}
],
"width": 1
},
{
"type": "Column",
"spacing": "Medium",
"items": [
{
"type": "Input.ChoiceSet",
"id": "SubscriptionNeededStatus",
"style": "expanded",
"isRequired": true,
"errorMessage": "This is a required input",
"choices": [
{
"title": "Yes",
"value": "True"
},
{
"title": "No",
"value": "False"
}
]
}
],
"width": 1
}
]
}
],
"$data": "${$root.user_subs}"
},
{
"type": "Container"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4",
"fallbackText": "This card requires Adaptive Cards v1.5 support to be rendered properly."
}

 

 

 

Here's the JSON data that was working on the website:

{
    "user_subs": [
        {
            "email": "bob.bobbert@company.com",
            "last_name": "Bobbert",
            "first_name": "Bob",
            "department": "department 1",
            "subscription": "Subscription A",
            "creation_date": "11-Jun-21",
            "status": "active",
            "part_number": "AAAAAAAA",
            "region": "Global",
            "contract": "Contract1"
        },
        {
            "email": "bob.bobbert@company.com",
            "last_name": "Bobbert",
            "first_name": "Bob",
            "department": "department 1",
            "subscription": "Subscription B",
            "creation_date": "11-Jun-21",
            "status": "active",
            "part_number": "AAAAAAAA",
            "region": "Global",
            "contract": "Contract1"
        },
        {
            "email": "bob.bobbert@company.com",
            "last_name": "Bobbert",
            "first_name": "Bob",
            "department": "department 1",
            "subscription": "Access",
            "creation_date": "",
            "status": "",
            "part_number": "",
            "region": "",
            "contract": ""
        }
    ]
}
Categories:
I have the same question (0)
  • TyTerror Profile Picture
    7 on at

    Here's what the card looks like on the website

    TyTerror_0-1707960264445.png

    Here's what it looks like in the emails from the automation

    TyTerror_1-1707960317371.png

     

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @TyTerror 

     

    I have posted the solution on my blog site, pls check it out:

    How to design an Adaptive card to receive multiple responses from team message for SharePoint list items? (manish-solanki.com)

     

    You have to skip get items & update item actions as those are not required in your case.

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • TyTerror Profile Picture
    7 on at

    This actually worked great. I had to change it a bit to use data from a csv instead of a SharePoint list but the functionality is the same.

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard