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 / Power Automate / Generate CSV with Vers...
Power Automate
Unanswered

Generate CSV with Version History from SharePoint List (Dynamic Site URL, List Name, and Columns)

(0) ShareShare
ReportReport
Posted on by 165
Hi everyone,
I’m trying to build a Power Automate flow that will generate a CSV file containing all items from a SharePoint list along with their full version history.
 
The requirements are:
 
1. The Site URL and List Name must come from the trigger inputs, so the same flow can be reused for multiple SharePoint lists.
  •     Example: I want to manually trigger the flow and enter Site URL + List Name once, and the flow should run using those values.
     
2. The flow should generate a CSV that includes:
  •     All list item fields
  •     All version history records for each item
  •     Version fields like VersionLabel, Modified, ModifiedBy/Editor, etc.
3. The CSV columns need to be dynamic, because each SharePoint list may have different columns.
  • I can't hardcode column names since the flow should work with any list.
4. I’ve tried calling the REST API endpoint:
    /_api/web/lists/getbytitle('LISTNAME')/items(ID)/versions
    but constructing the URL dynamically and extracting user fields like “Modified By” has been tricky.

 
Does anyone have a sample flow, pattern, or best approach for:
dynamically getting all fields for each item
looping through each item’s version history
building a CSV dynamically
supporting any SharePoint list through trigger inputs
 
Any help, examples, or guidance would be greatly appreciated. Thank you!

P.S. I've already created a working flow from a sample SharePoint List, but my problem is the columns are hardcoded. I want it to be dynamic so I can use for other SharePoint Lists.
Categories:
I have the same question (0)
  • Power Platform 1919 Profile Picture
    2,205 Super User 2026 Season 1 on at
    HI @_maaaaavs_,
    Can you please the screenshots of the working flow, based on that we can look and update the flow to support dynamic parameters.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 495

#3
Vish WR Profile Picture

Vish WR 429

Last 30 days Overall leaderboard