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 / Regarding Pagination i...
Copilot Studio
Answered

Regarding Pagination in Copilot studio

(1) ShareShare
ReportReport
Posted on by 20
I have a topic which has a flow inside it , the flow has the logic which creates a KQL query to a table which is inside Azure application insights , and returns rows whichever are applicable , but sometimes the rows fetched are very high in number which is lets say more than 500 , how to show them in the response of the agent , can we create some downloadable link , or we can give a csv of the rows or anything else , so that the user has all the relevant information , or as flows are made in Power Automate , is there anything we have to do in Power automate for this??
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    69,452 Most Valuable Professional on at
    The easiest thing would probably be to have the Power Automate flow create a csv from the array of rows and then save that to a file in a SharePoint site.  You can then create a sharing link to that file and return that to the agent.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Suggested answer
    11manish Profile Picture
    2,293 on at
    When dealing with large KQL query results (e.g., 500+ rows), you should not return the data directly in the agent response.
     
    The best approach is to use Power Automate to generate a CSV or Excel file, store it in SharePoint or OneDrive, create a secure download link, and return that link along with a summary (such as total row count and a preview).
     
    This ensures performance, usability, and scalability while giving users access to the full dataset.
  • Verified answer
    Nivedipa-MSFT Profile Picture
    Microsoft Employee on at
    Hello ,

    Avoid sharing entire data rows in chat—summarize the results and provide a download link instead. Use Power Automate to handle data processing efficiently.

    Steps in Power Automate (after KQL query):

    1. Use the Create CSV table action to convert rows into a CSV format.
    2. Save the file:
      • For OneDrive/SharePoint, use the Create file action to generate a WebUrl.
      • For Azure Blob, use Create blob and generate a SAS URL—ideal for larger or time-limited files.
    3. Return the following to the agent: RowCount, DownloadUrl, and a preview of the top 5–10 rows.

    In Copilot Studio:

    • Respond with: "Found {RowCount} rows. Download CSV" and include a brief preview table.
    • Present the information using an Adaptive Card with a Download button.
    • If RowCount is 20 or fewer, display the data inline; otherwise, show a preview and provide the download link only.

    If you found the information above helpful, I would appreciate it if you could share your feedback.
    Your feedback is important to us. Please rate us:

    🤩 Excellent 🙂 Good 😐 Average 🙁 Needs Improvement 😠 Poor
  • PG-13041328-0 Profile Picture
    20 on at
    Hii Nivedipa , can you just explain how to create the csv table from the data we get from the query , do you have any example ??
  • Nivedipa-MSFT Profile Picture
    Microsoft Employee on at
    Hello  ,
     

    You can use the built-in "Create CSV table" action to quickly convert a JSON array to a CSV file.

    Steps

    1. Run your KQL query in Azure Monitor Logs / App Insights → Run query and list results. This will provide an array of JSON objects, each representing a row.
    2. Add the Data Operation → Create CSV table action:
      • From: use the array (for example, body('Run_query_and_list_results')?['value'])
      • Columns: choose Automatic for all fields, or Custom to rename or reorder columns using item()?['colName']
    3. Save the CSV output to SharePoint / OneDrive → Create file:
      • File name: KqlReport_@{utcNow('yyyyMMdd_HHmmss')}.csv
      • File content: body('Create_CSV_table')
    4. Return the file's WebUrl to the agent.

    Example output

    timestamp,name,resultCode,duration
    2026-04-27T10:00:00Z,GET /api/orders,200,123.4
    2026-04-27T10:01:00Z,GET /api/users,500,87.2

  • PG-13041328-0 Profile Picture
    20 on at
    Hey @Nivedipa , can we do it any other way other than this Sharepoint or Azure Blob storage ?Bcoz I have a dependency that I cant use this 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 666

#2
Vish WR Profile Picture

Vish WR 327

#3
Haque Profile Picture

Haque 253

Last 30 days Overall leaderboard