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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / File creation & file c...
Power Automate
Answered

File creation & file conversion error

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I'm struggling to work out why my flow is failing. I'm pretty new to using Power Automate and following the instructions I have built this flow. However, it keeps failing at the 'convert file' stage and I'm not sure why. The error report says 

HannahEDI_0-1690560422396.png

I think therefore that this issue is in the creation stage, as when I look at the file that has been created it has no file extension:

HannahEDI_1-1690560531876.png

So perhaps then the conversion cannot take place from this starting point?

 

As far as I can tell, my create file stage is exactly the same as that on the instructions:

HannahEDI_2-1690560652347.png

Any ideas on where I am going wrong?

Categories:
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @HannahEDI  Pls share complete flow. where is your Convert_File action?

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • SamLed Profile Picture
    2,340 Moderator on at

    Hi,

    in the article, the guy wrote : "The File is named with the Participants Full name as a Dynamic Content, time as an Expression and the .docx document type and the File Content is the Body Dynamic Content from the Updated File Properties."

     

    So add ".docx" after utcNow() in your create file action.

     

    SamLed_0-1690562405917.png

     

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

  • HS-11121107-0 Profile Picture
    on at

    HannahEDI_0-1690562679742.png

     

  • sandeepstw Profile Picture
    312 Moderator on at

    Hi There,

     

    The convert file needs an extension so make sure you have the same extension in create file action. 

    if you're creating a Word document, your filename should be 'filename.docx'. If it's an Excel file, it should be 'filename.xlsx'.

     

    make sure that the 'Convert File' action supports the type of file you're creating.

     

     

    Please give kudos and mark as the solution if it helps.  

      

    Thanks, 

    Sandeep Mishra 

     

  • HS-11121107-0 Profile Picture
    on at

    Hello, thanks for this, have given it a try and the error message changes:

    Error from Office Service. Url=https://euc.wordcs.officeapps.live.com/document/export/pdf HttpCode=BadRequest cert=subject:;thumbprint: ResponseHeaders=X-ErrorCode: WordCantOpenDocument
    X-ClientCorrelationId: 5789a49a-7b09-48b4-b2c9-b2032d20fd1b
    X-ServiceCorrelationId: 5789a49a-7b09-48b4-b2c9-b2032d20fd1b
    X-ErrorCategory: BadRequest
    X-IsRetriable: False
    X-ConversionTimeInMs: 156.258
    X-FileDownloadTimeInMs: 109.3865
    Cache-Control: private
    Date: Fri, 28 Jul 2023 16:46:11 GMT
    Server: Microsoft-IIS/10.0
    X-AspNet-Version: 4.0.30319
    X-Powered-By: ASP.NET

     

    but the conversion stage still fails. I'm trying to convert a .docx to a .pdf so it seems that this should be pretty standard?

  • HS-11121107-0 Profile Picture
    on at

    Hello, thanks for this, have given it a try and the error message changes:

    Error from Office Service. Url=https://euc.wordcs.officeapps.live.com/document/export/pdf HttpCode=BadRequest cert=subject:;thumbprint: ResponseHeaders=X-ErrorCode: WordCantOpenDocument
    X-ClientCorrelationId: 5789a49a-7b09-48b4-b2c9-b2032d20fd1b
    X-ServiceCorrelationId: 5789a49a-7b09-48b4-b2c9-b2032d20fd1b
    X-ErrorCategory: BadRequest
    X-IsRetriable: False
    X-ConversionTimeInMs: 156.258
    X-FileDownloadTimeInMs: 109.3865
    Cache-Control: private
    Date: Fri, 28 Jul 2023 16:46:11 GMT
    Server: Microsoft-IIS/10.0
    X-AspNet-Version: 4.0.30319
    X-Powered-By: ASP.NET

     

    but the conversion stage still fails. I'm trying to convert a .docx to a .pdf so it seems that this should be pretty standard?

  • HS-11121107-0 Profile Picture
    on at

    Also, when I do put .docx in the file creation stage, it does create a .docx but this is also unreadable by the system and won't open even if I click yes on the pop-up below.

    HannahEDI_0-1690564247590.png

     

  • SamLed Profile Picture
    2,340 Moderator on at

    Well, a word file is not defined by its extension but by its format, the extension help to determine which format the file is based on. The important point at this stage isn't how you name it but from what content you create it. According to the article you get content from a word file template.

     

    We're going to debug step by step. We need to check result after each step. You can use the terminate control action to stop flow after the action for which we need to check the result.

     

    SamLed_0-1690585212505.png

     

    1° Add terminate after first "Update file properties" action.  Run flow, "Copy file" action copies file template to "Personal Certificates" folder, properties are updated, check if you can open the copied word file and if properties are correctly set.

    2° Delete previous created file, move terminate action after the "Create File" action, run flow again, check file created can be opened. 

    Remark : in your flow I can see two "Get content" actions, you should only have one. Remove the extra action and check you set the "File identifier" field with the correct ID. It should be the id dynamic content of the copied file from "copy file" action.  

     

    I think you messed up settings in one of those steps, if you can open created file, conversion should be functional.

     

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

     

  • HS-11121107-0 Profile Picture
    on at

    Thanks SamLed, I have done as you suggest.

    1. Terminate in this placement showed successful copy of file and properties

    2. On moving the terminate after the 'create file' stage, the resulting file cannot be opened. The double 'get content' was a faulty screenshot stitch on my part, there is only one stage. The 'Id' for this dynamic content says "the unique id of the file or folder"

     

    Having identified that this is where the error is occurring, can you advise on next step?

  • SamLed Profile Picture
    2,340 Moderator on at

    Please post the whole error message from create file?

     

    [Edit] Ok, read too fast, there is no error... but are you able to open copied file from which you are getting content?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 249 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 202

#3
David_MA Profile Picture

David_MA 180 Super User 2026 Season 2

Last 30 days Overall leaderboard