cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Create File in OneDrive for Business does not create file

This flow is connected to a PowerApp.  When I go into the PowerApp and run it through there, everything works fine.  The file gets created, converted, and emailed.  

 

However, when someone else goes in (has access to PowerApps and my OneDrive for Business folder) the flow fails at sending out the email because apparently the file does not exist despite the Create File 5 passes.  When I go to the OneDrive folder as the flow is running, there is never a file created...

 

Am I missing something here?  Why does it create the file and email when I run it through PowerApps but it does not when someone else does it?

 

 

Part to create filePart to create fileGet File metadata and then contentGet File metadata and then contentAttach file to email with the created file contentsAttach file to email with the created file contentsjj

 

 

 

 

This is the failed flow:

 

Snag_a473ef0.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

For future lurkers:

 

I found a workaround by having the new docx file created and converted to PDF on a company-public Sharepoint site.  The flow then creates a new item to the Sharepoint list and then the flow finishes.  I then have a new flow that's automatically triggered when there is an item created on this list and takes all the info from there to send out the email from a shared inbox and then deletes the item. 

View solution in original post

5 REPLIES 5
Highlighted
Memorable Member
Memorable Member

Hi @imAdash 

For the file not being created in OneDrive when the Flow is triggered by another user normally indicates the user doesn't have the proper access to create files in your OneDrive folder. As for your Flow, I see one of your actions is the Populate a Microsoft Word template. Instead of using the OneDrive - Convert file, you can use the Convert Word Document to PDF. The Word connector can handle file sizes up to 10MB while the OneDrive connector can only handle up to 2MB.

Please double check your OneDrive access and also look into the action I mentioned for the Word connector. Once you test it, please let us know.

Thank you,

Fausto Capellan, Jr

Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!
Highlighted

Hey @faustocapellanj 

 

 

I went to check the folder that contains all the files and the person was set to "Contribute" and "Limited Access"

 

I changed it to "Full Control" and the flow is still doing the same error.  I can't uncheck the "Limited Access" because it's greyed out.

Is there some other way I need to grant proper access to create files in my OneDrive folder? 

 

As for the Populate a Microsoft Word template, I didn't use it because I read I can't use dynamic content while selecting the file path. 

Highlighted
Community Support
Community Support

 

Hi @imAdash ,

 

It seems that this is because you used the PowerApps button as a trigger, so this kind of error will appear.

if a Flow is started manually or through PowerApps then the Flow will run in the context of the user who started it, not in the context of the original maker.

 

Please try to do this test, don't configure the Attachment Name and Attachment Content, and let other users trigger Flow, I guess this error will still happen.

If the test results are consistent with what I described, the problem should be related to Shared mailbox.

 

Please make sure that the user currently using the App or triggering Flow is a member of this shared mailbox, and then see if the issue still exists.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

@v-bacao-msft 

 

Looks like you are correct, the error still happened at the Shared Mailbox step.  Is there a way around this without giving everyone access to the shared mailbox?  I'd rather not give it to 400+ users for various reasons, but I do need the email to be ultimately sent from the shared inbox. 

 

You mentioned this is only an issue if the flow is ran manually or triggered via PowerApps, can I have PowerApps trigger a Flow that will then run this flow to get around this issue? 

Highlighted

For future lurkers:

 

I found a workaround by having the new docx file created and converted to PDF on a company-public Sharepoint site.  The flow then creates a new item to the Sharepoint list and then the flow finishes.  I then have a new flow that's automatically triggered when there is an item created on this list and takes all the info from there to send out the email from a shared inbox and then deletes the item. 

View solution in original post

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.

Top Solution Authors
Top Kudoed Authors
Users online (7,623)