cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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.

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). 

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.

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). 

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

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 273 members 4,280 guests
Please welcome our newest community members: