Skip to main content

Notifications

Copilot Studio - Topic Creation & Management
Unanswered

Dynamic adaptive cards

(1) ShareShare
ReportReport
Posted on by 24

Hello,

 

I need help in creating adaptive cards which are dynamic. The dynamic values has to be used in Input.choiceset and action.submit. 

 

So, please share two samples one for input.choiceset and another for action.submit.

@HenryJammes, Could you please help me out.

 

Regards

Yogesh

  • Yogesh3097 Profile Picture
    Yogesh3097 24 on at
    Re: Dynamic adaptive cards

    Hello @HenryJammes,

     

    I am having difficulty in passing the variable into adaptive card. Please check the file which I have attached above for further details.

     

    Thanks

    Yogesh

  • JGT Profile Picture
    JGT 32 on at
    Re: Dynamic adaptive cards

    You have to format dynamic data to be the JSON format adaptive cards take. Use Power Automate to make variables that are formatted correctly. Then pass those variables to the adaptative card. 

    Create flows that post adaptive cards to Microsoft Teams - Power Automate | Microsoft Learn

  • Yogesh3097 Profile Picture
    Yogesh3097 24 on at
    Re: Dynamic adaptive cards

    Hello @HenryJammes ,

    Thanks for the reply.

    I parsed the data. I am having issues in using the data in adaptive card only. 

    Please refer the zipped file. Please let me know the solution.

     

     

    Regards

    Yogesh

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: Dynamic adaptive cards

    Hi @Yogesh3097 

     

    Have a look at these:

     

    henry

  • JGT Profile Picture
    JGT 32 on at
    Re: Dynamic adaptive cards

    I have a power automate flow that does this with composing a variable, and posting in. the card is formatted like this:

     

    {
     "type": "AdaptiveCard",
     "body": [
     {
     "type": "TextBlock",
     "size": "large",
     "text": "Worktype Set to Must Change: Please update below",
     "weight": "Bolder",
     "wrap": true
     },
     {
     "type": "TextBlock",
     "size": "Medium",
     "weight": "Bolder",
     "text": "@{items('Apply_to_each')?['ticket']?['id']}- @{items('Apply_to_each')?['ticket']?['summary']}",
     "maxLines": 0,
     "wrap": true
     },
     {
     "type": "TextBlock",
     "text": "@{items('Apply_to_each')?['notes']}",
     "wrap": true
     },
     {
     "type": "Input.ChoiceSet",
     "placeholder": "New Work Type",
     "choices": [
     @{variables('worktypes')}
     {
     "title": "Do not use",
     "value": "2"
     }
     ],
     "id": "typeWord"
     }
     ],
     "actions": [
     {
     "type": "Action.Submit",
     "title": "Submit",
     "id": "submit"
     }
     ],
     "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
     "version": "1.4"
    }

    The variable @{variables('worktypes')} is grabbed and formatted to a string in a previous step:

    JGT_0-1690198114364.png

    I'm not sure if this is what you mean exactly, and it may not be formatted perfectly for what you need in PVA. Maybe it's a start though!

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard

Featured topics