cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leemex
Advocate II
Advocate II

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
Kudo Kingpin
Kudo Kingpin

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

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
Kudo Kingpin
Kudo Kingpin

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

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?

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.

Anonymous
Not applicable

Hello,

 

Is there a solution? I am looking for same.


Thanks,
AK

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

Anonymous
Not applicable

Thanks,

Could you please provide more information how you did it?

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.

anton-khrit
Helper V
Helper V

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
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (37,198)