cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Power Automate Flow to upload documents within document set

Hi All,

 

I've written a flow which will take the inputs from PowerApps form created for a list and will create a folder structure in a library. Within that folder structure it will also create a document set. Now, I've one more requirement. I need to add attachments in the same PowerApps form created for a list and this time the flow should also add those attachments as documents within the newly created document set in document library.

I've gone through the blogs to add document to document library from PowerApps form but I need to add that too after creation of document set. Can anyone suggest me on this?

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions

Very good!

So the steps are:

  1. User opens Power App and can add attachments
  2. When submitting a form, an item in SharePoint is saved with attachments
  3. You trigger a flow to create a document set
  4. After the document set is created, every attachment should be transfered (copied) to the document set

Step 4 is causing you issues when I look at the screenshot linked to your blog post.

So the first thing you should limit for good troubleshooting is to start with a file like PDF or Word because in my experience not all actions in a flow will work with all type of files. So first let us get your flow working with a PDF file attachment as these are the safest kind 😁.

 

First thing to tourbleshoot is to see if your Step 3 can be causing an issue. Could you create a second simple Flow that does basically the same steps regarding document creation but without the document set part --> just get attachments + apply to each attachment + get attachment content + create file but select a library that you know is existing instead of a variable??

View solution in original post

5 REPLIES 5
Kudo Commander
Kudo Commander

Hi @basukunal001 ,

Do you have a Flow directly linked to the Power App or do you store your Power App Data somewhere in a record (like a SharePoint List) and then a separate Flow is triggered on that record?

 

Hi Django,

 

I got a way to implement this. I can copy the attachments from PowerApp form in list to document library. I've followed the below blog to implement it.

https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Moving-PowerApps-Attachments-to-a-...

 

But I've got some issues. If I try to upload text file as attachment, the flow runs fine but nothing got uploaded to library. When I try to upload .docx file or .xlsx file, the flow throws an error.

 

I've shown the steps on that above blog at the bottom.

 

Thanks,

Kunal

Very good!

So the steps are:

  1. User opens Power App and can add attachments
  2. When submitting a form, an item in SharePoint is saved with attachments
  3. You trigger a flow to create a document set
  4. After the document set is created, every attachment should be transfered (copied) to the document set

Step 4 is causing you issues when I look at the screenshot linked to your blog post.

So the first thing you should limit for good troubleshooting is to start with a file like PDF or Word because in my experience not all actions in a flow will work with all type of files. So first let us get your flow working with a PDF file attachment as these are the safest kind 😁.

 

First thing to tourbleshoot is to see if your Step 3 can be causing an issue. Could you create a second simple Flow that does basically the same steps regarding document creation but without the document set part --> just get attachments + apply to each attachment + get attachment content + create file but select a library that you know is existing instead of a variable??

View solution in original post

Hi Django,

 

It seems I've fixed the issue. I went to "Create File" action >> Settings and then disabled 'Allow Chunking'. It worked.

 

Thanks,

Kunal

Thank you for sharing @basukunal001 !

 

Chunking would not be something, I would have come up in the first few trouble shooting steps 😁

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (15,589)