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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Capture version of Doc...
Power Automate
Answered

Capture version of Document Set using Power Automate Flow

(0) ShareShare
ReportReport
Posted on by 13

Is there already some solution how to "Capture version" of the Document Set using the Power Automate Flow.

Function to Capture the version is there for some time (at least 3 years), but not to activate it automatically using a Flow.

fsvelim1_0-1699965056582.png

To avoid some misunderstandings, I am talking about a function on Document Set in Library, which makes a snapshot of the whole Document Set, including all documents inside. Everybody can see the original content of the Document Set and the original version of the documents. I do not need to get version number or such. Just activate the automatic function as when I would choose it from menu.

I saw some workarround solution using HTTP request to Microsoft Graph Beta, but that will not solve my problem, as I can not use web HTTP requests. I can use standard flow functions or HTTP request to Sharepoint API.

Thank you very much.

 

Milos

Categories:
I have the same question (0)
  • wskinnermctc Profile Picture
    6,519 Moderator on at

    If you can use the HTTP Request to SharePoint, then you would be able to use that Graph call. It just might take some adjustment of the URI. See the Link

    SharePoint REST operations via the Microsoft Graph REST API

     

    Can you add the link to where you saw someone using the Microsoft Graph Beta?

  • fsvelim1 Profile Picture
    13 on at

    I believe here was the example:

    Create documentSetVersion - Microsoft Graph beta | Microsoft Learn

  • Verified answer
    wskinnermctc Profile Picture
    6,519 Moderator on at

    @fsvelim1 thank you for the link.

     

    If you use "Send an HTTP request to SharePoint" you will be able to create a documentSetVersion.

     

    Create a documentSetVersion with a POST http request to SharePointCreate a documentSetVersion with a POST http request to SharePoint

     

    This is a POST type http request.

     

    The Uri used:

    _api/v2.1/sites/{HostName}/lists/{ListId}/items/{ItemId}/documentSetVersions

    The Body Used:

    {
     "comment": "put your comments about the version here",
     "shouldCaptureMinorVersion": false
    }

     

    When the flow is run the uri will look something like this:

    _api/v2.1/sites/sunmc.sharepoint.com/lists/db3c3205-899b-4713-a6a5-58915927df57/items/22/documentSetVersions

     

    You will have to get the HostName and ListId through other HTTP requests. You can get the ItemId with a "Get Folder Metadata" action. To keep it simple I just wanted to show how the new document set version is created.

  • fsvelim1 Profile Picture
    13 on at

    Thank you very much. I did try some calls before, but not successful. Will try this and let you know about the result. Have a nice day.

  • fsvelim1 Profile Picture
    13 on at

    Or maybe a question. In the uri you refer to /lists/, but in fact this is a library, not list. How to deal with that?

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    A document library is a list. It is just a special kind of list. And Files are special kinds of List Items.

     

    So when you create a Document Library, you are creating a List and a Folder. The List is where all of the data is stored. The folder is what holds the files.

     

    A Document Library will have a UniqueId for the Folder and separate UniqueId for the List. Just like each File will have a UniqueId for that file but also a separate List ItemId.

     

    SharePoint List Template Types

     

    I'm really simplifying how it works. But your Document Library has a ListId.

  • fsvelim1 Profile Picture
    13 on at

    Thank you very much for your help. This really works. I very appreciate your detail explanation and example.

  • NiteWalker Profile Picture
    71 on at

    Hi @wskinnermctc ,

     

    Thanks for show how to do this. I was going down the MS Graph way, but Power Automate didn't seem to like it.

     

    One question: Is there a way to add properties that may have changed? 

     

    Like these...

    document set properties exampledocument set properties example

     

    Have great day!!

     

    -Monty

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard