cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leemex
Level: Powered On

Create document set with REST

I'm successfully able to create a document set with flow, but I'd like to update it at the same time with the same request.

 

I've followed these instructions

https://www.itidea.nl/index.php/create-a-document-set-using-jsom-and-rest/

 

but I'm stuck when it comes to this part:

 

var docSetOptions = {
‘Title’: myTitle,
‘Path’: ‘/Documents’,
‘ContentTypeId’: contentTypeId,
‘ContentType’: contentType};

I don't know how to declare this array in flow. Can anyone help?

 

Cheers

2 ACCEPTED SOLUTIONS

Accepted Solutions
Brentless
Level 8

Re: Create document set with REST

I can pretty definitively tell you not possible in the same request.  You have to create and then update in 2 actions. I've been looking for this for years, and no matter what angle you go at it (jsom, csom, rest, etc), it just doesnt work that way.

View solution in original post

leemex
Level: Powered On

Re: Create document set with REST

Hi Akumar

 

I ended up creating a document set with PowerShell and Azure Automation Services (it's free to a certain point). 

View solution in original post

8 REPLIES 8
Brentless
Level 8

Re: Create document set with REST

I can pretty definitively tell you not possible in the same request.  You have to create and then update in 2 actions. I've been looking for this for years, and no matter what angle you go at it (jsom, csom, rest, etc), it just doesnt work that way.

View solution in original post

leemex
Level: Powered On

Re: Create document set with REST

Hey there

 

Thanks for your answer.

Really? Strange though as you can do it without flow. E.g. like in the link I've posted. Do you say flow doesn't support it or it doesn't know how to declare the jsonpayload variable?

leemex
Level: Powered On

Re: Create document set with REST

I'm sorry - I misunderstood something in the actual blog post I was posting. I realized that all those values are default values and assumed (without checking what fields he's using) that you can add whichever custom fields you like).

 

Thanks - knowing that it is not possible is still better than trying to figure out how it works without ever finding success.

Akumar
Level: Powered On

Re: Create document set with REST

Hello,

 

Is there a solution? I am looking for same.


Thanks,
AK

leemex
Level: Powered On

Re: Create document set with REST

Hi Akumar

 

I ended up creating a document set with PowerShell and Azure Automation Services (it's free to a certain point). 

View solution in original post

Highlighted
Akumar
Level: Powered On

Re: Create document set with REST

Thanks,

Could you please provide more information how you did it?

leemex
Level: Powered On

Re: Create document set with REST

I created a flow which is using the azure action "create job". To choose a job out of this list, you'd need to create a subscription (again, it's free to a certain point) with Azure Automation Services. Within Azure Automation, you'd need to create so-called "runbooks" which are basically just scripts such as PowerShell scripts. 

 

In short:

Flow is starting a PowerShell script which is stored on Azure.

Super User
Super User

Re: Create document set with REST

You can create document sets without REST calls. Please review this Microsoft flow action. It is the action from Plumsail SP connector, which is a part of Plumsail Actions product.

 

Note, this product is a paid solution.

 

CreateSharePointDocumentSetExample.png

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,476)