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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create a docx file upo...
Power Automate
Unanswered

Create a docx file upon new items in Sharepoint

(0) ShareShare
ReportReport
Posted on by 92

Hi

 

I have a requirement to auto create invoice file in word document upon an item is added to a sharepoint list. So I thought to create a flow using : When an item is created in Sharepoint and then create a file in onedrive. While it is able to create the docx file but when I open the file, it says file is corrupted. I suspect it has to do with the [File Content] parameter at my step of creating the docx file in onedrive. Any idea if we should be entering a specific format in the [File Content] parameter?

 

Any advice is appreciated. 

 

Thanks!

Boon Yar

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    on at

    Hi BoonYar_Aeris,

     

    Thanks for feedback. It seems that I am getting the same issue with you when I run a flow to create a file in OneDrive when a new item is created in SharePoint list. The file created in OneDrive cannot be opened.


    I will help confirm this issue on my side.


    BTW, you may consider to use this template to convert the file to a pdf file:
    https://us.flow.microsoft.com/en-us/galleries/public/templates/07665690148611e7874cb9dbc2074cda/automatically-convert-newly-added-onedrive-files-to-pdf/

     

    Best regards,
    Mabel Mao

  • BoonYar_Aeris Profile Picture
    92 on at

    Hi Mabel,

     

    Yes please help me find out what should we be putting inside File Content.

     

    The link you gave me is to convert docx to pdf. What I am doing here is to create docx file first. 

     

    Thanks

    Boon Yar

  • mdmoo1978 Profile Picture
    3 on at

    I have been able to make a text file, by having a string converted to binary. I know that isn't super helpful, but it is as close as I have gotten. 

     

    I know that a docx is just a archive collection of xml files, but I don't know how to "compress" after I'm done editting.

     

    If you figure it out I want to know.

  • mauledbyjesus Profile Picture
    6 on at

    I know this is old but I just ran into this issue. It turns out that the "Create File" SharePoint action can only create .doc files, so if you give the file a .docx extension, the action completes, but the resulting file is NOT a .docx file. 

    Use the .doc extension and you will be able to open the file. Of course it's not 2009, so .doc files aren't of much use, but that's a different issue.

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard