web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sharepoint create file...
Power Automate
Unanswered

Sharepoint create file not creating file in correct format

(0) ShareShare
ReportReport
Posted on by 2

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?

 

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    on at
    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

     

  • Zubeyr Profile Picture
    2 on at
    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

  • Lids Profile Picture
    2 on at
    Re: Sharepoint create file not creating file in correct format

    Try using an expression to create the file name.

     

    Example:  

    concat(variables('TransmittalName'),'.xlsx')
     
    In your case replace "TransmittalName" with the "Titel" dynamic content and the "xlsx" with the correct file extention.
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard