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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Iterate through data ...
Copilot Studio
Unanswered

Iterate through data from dataverse to adaptive card in Copilot Studio

(0) ShareShare
ReportReport
Posted on by 10
Hi ,
I am currently developing a custom bot in Copilot Studio for a system license recommendation use case and would appreciate your help on an issue I am facing.
Use Case Overview:
The bot asks users a series of questions with predefined answer options. Based on the user’s responses, the bot recommends an appropriate license.
Current Implementation:
  • At present, the questions and answer options are hardcoded into multiple Adaptive Cards within Copilot Studio (around 16 cards).
  • Each Adaptive Card represents one question with its corresponding answer choices.
Target Implementation:
  • I have now created a Dataverse table that stores the questions and their corresponding answer options.
  • I would like to use a Power Automate flow to:
    • Fetch each question and its answer options from Dataverse
    • Dynamically populate them into a single Adaptive Card
    • Iterate through the questions one by one, so that when the user clicks Next, the flow retrieves the next question and updates the Adaptive Card accordingly
Challenge:
  • I have successfully created a Power Automate flow to list rows from Dataverse.
  • However, I am unable to iterate through the Dataverse records within Copilot Studio and dynamically bind the data to an Adaptive Card.
  • Due to this limitation, I am currently forced to use multiple Adaptive Cards instead of a single, reusable one.
Questions:
  1. Is it possible to dynamically iterate Dataverse records in Copilot Studio and render them in a single Adaptive Card?
  2. Are there supported patterns or best practices to achieve this using Power Automate and Adaptive Cards?
  3. Are there any known limitations in Copilot Studio that prevent this scenario?
I would appreciate any documentation, examples, or recommended approaches to achieve this functionality.
 
 
 
 
I have the same question (0)
  • chiaraalina Profile Picture
    2,213 Super User 2026 Season 1 on at
    Hi
     
    There is no native side looping in Copilot Studio. As far as I know you cannot iterate through Dataverse records within a single conversation turn like in Power Automate with "Apply to each".
     
    You can achieve sequential question presentation using a turn based pattern with state management. Like simulating iteration across multiple conversation turns.
     
    • You have to use Global variables to track question index.
    • Use Power Automate to fetch the next question from Dataverse based on the current index.
    • Then use Topic redirection or the "Go to step" to loop back and re-render the same Adaptive Card with new data.
     
    1. Initialize State
      For example: Set Global.CurrentQuestionIndex = 1 at the start of the conversation
       
    2.  Fetch Question Data
      Call a Power Automate flow with input: Global.CurrentQuestionIndex
      Flow queries Dataverse: "Get row where QuestionNumber = CurrentQuestionIndex"
      Flow returns: question text, answer options (JSON)
       
    3. Display Adaptive Card
      Use a reusable topic with topic inputs for question data
      Populate the Adaptive Card using Power Fx formulas to bind dynamic content
      Use Topic.QuestionText and Topic.AnswerOptions variables to fill card elements (for example)
       
    4. Capture User Response
      Store the user's answer in a global or topic variable
       
    5. Increment and Loop
      Increment Global.CurrentQuestionIndex by 1
      Use a Condition node to check if more questions remain
      If yes: Use "Go to step" to jump back to step 2
      If no: Proceed to license recommendation logic

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 244

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 221 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 196

Last 30 days Overall leaderboard