Showing results for 
Search instead for 
Did you mean: 
New Member

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:




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?


Community Support
Community Support

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.





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.
New Member

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:


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

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.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (4,407)