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

Community site session details

Session Id : c1eGMJARyyMcbuAOUjZzPZ
Copilot Studio - General
Unanswered

Create a dynamic adaptive card from sharepoint lists.

Like (0) ShareShare
ReportReport
Posted on 17 Apr 2023 22:39:44 by 58

Evening All, 

I have fairly recently discovered PVA web based site and am trying to create a “simple” dynamic adaptive contact card using info from a Sharepoint list. 

I have heard that I need to create variables first using a PA flow and insert those variables in my card. How do I insert variables into an adaptive card. I’m familiar with the Microsoft developer portal app. 

Thanks 

Categories:
  • AJ-02050920-0 Profile Picture
    2 on 02 May 2025 at 09:42:47
    Create a dynamic adaptive card from sharepoint lists.
    Hi,

    Suppose you wanna add a dropdown in adaptive card, whose data is dynamically coming from a SharePoint list.
    Example - there's a column name Team in SharePoint List which you you want to use.
    You can follow these steps –
    1. To fetch the Team/Technology name from SharePoint list, click on “+ (Add Node)” sign -> Add an action -> New Power Automate Flow

     
    It will open Power Automate in a new window.
     To create the flow please follow these steps -
    • Add Get items node. Add SharePoint site address and select the list name. Also add Order By to sort the team/technology name in Alphabetical order.
    • ​​​​​​​Use built-in Select operation to extract the value of Title and ID.



     
    • ​​​​​​​Use compose with fx – string(body('Select'))

     
    • ​​​​Initialize a string variable.
    • ​​​​​​​Use another compose with fx- concat(variables('q'),outputs('Compose'),'}')

    • ​​​​​​​Respond compose’ s value as output.
     
    • After publishing the flow come back to the topic and you will see the new created flow in the list. Click on it.

     
    1. Click on “+ (Add Node)” sign -> Variable Management -> Parse Value
    Schema -
    kind: Record

    properties:
      items:
        type:
          kind: Table
          properties:
            title: String
            value: String


     
    1. Click on “+ (Add Node)” sign -> Variable Management -> Set a variable value
    Fx –ForAll(Topic.Var1.items, { title: ThisRecord.title, value: ThisRecord.title})
    1. Click on “+ (Add Node)” sign -> Ask with adaptive card
    2. Click on adaptive card and use the following formula-
    {
      type: "AdaptiveCard",
      body: [
        {
          type: "TextBlock",
          size: "Medium",
          weight: "Bolder",
          text: "To Raise A Request/Incident",
          color: "Accent"
        },
        {
          type: "TextBlock",
          text: "Please select the name of the team or technology so that I can provide you the Service Now Application and Assignment Group.
          ",
          wrap: true
        },
       
        {
          type: "Input.ChoiceSet",
          choices: Topic.InputChoiceSet,
          placeholder: "Team/Technology",
          id: "ch1",
          label: "Select your Team/Technology"
        },
        {
          type: "ActionSet",
          actions: [
            {
              type: "Action.Submit",
              title: "View Response",
              style: "positive",
              id: "btn1"
            }
          ]
        }
           
      ],
      '$schema': "http://adaptivecards.io/schemas/adaptive-card.json",
      version: "1.3"
    }




     
  • Expiscornovus Profile Picture
    32,169 Most Valuable Professional on 17 May 2023 at 14:15:44
    Re: Create a dynamic adaptive card from sharepoint lists.

    Hi @Alexa2022,

     

    You should be able to select/use the dynamic content fields like variables in your adaptive card json.


    Below is an example article which demonstrates the usage of Link to item field in an adaptive card:

    https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Send-an-Adaptive-Card-to-Microsoft-Teams-using-Power-Automate/ba-p/1512206

     

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

Announcing our 2025 Season 2 Super Users!

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 169 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 150

#3
sandeep_angara Profile Picture

sandeep_angara 75 Super User 2025 Season 2

Loading complete