cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Zubeyr
Level: Power Up

Sharepoint create file not creating file in correct format

I am pretty new to Microsoft Flow and it seemed to work for me until the end of the flow.

My flow is: When a new item is created in sharepoint list - > create a file in sharepoint. And its pretty wierd, because the flow is not giving me any error, but only when im trying to open the file, im getting this error in the app:

 

error.jpg

 

I have tried to open file in desktop word, no luck. And also tried different formats like: .doc , .pdf and .txt 

 

 

Here is my flow:

 

I am creating a new item - Only using 2 fields. Afterwards its creating a file in a given document library in sharepoint. 

As mentioned above its not possible to open it. 

 

create file.jpg

 

The result looks like this:

I dont know why, but the output is in HTML format. The "e-mail" field is RTF and the layout turns into Word when im typing something there. 

 html content.jpg

 

 

What am I doing wrong? Any ideas?

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Sharepoint create file not creating file in correct format

Hi Zubeyr,

 

I have just tested with the same flow like yours and I got the same result. After some test, I think this is normal behavior. I think the "File Content" field does not mean that you put some value inside the file. You need to give this field a complete file extracted from the previous trigger/action. 

 

For example, if your trigger is "OneDrive - When a file is created", then in "SharePoint create a new file" action, you put the OneDrive file in the "File Content" field, then it could be opened from sp site successfully.

 

Hope the explanation is clear enough.

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Zubeyr
Level: Power Up

Re: Sharepoint create file not creating file in correct format

Hey Mona.

 

Thanks for you reply, but it is not the right solution.

 

When im choosing "Onedrive - when a file is created" -> its asking about windows live login and not business/organization account.

And right now im usin Onedrive nextgen and no way i am going back to onedrive for business. Just to make sure i have also tested with Onedrive for business and i could only choose the /root folder.

 

The reason for im trying this flow is, only because of attached files is not availible in my flow.

 

The flow i want is: Create an item in sharepoint list and while creating: attach a file. Like here:

 attachfile.jpg

Then add the file in sharepoint and afterwards send the attached file.

 

I have tried a lot of time to do that, but its not possible to use the attached file in flow -  as i understand

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,595)