Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 7OzEhybDL/CkorDMTWpmWo
Power Automate - Using Connectors
Answered

Error: Convert file to PDF

Like (1) ShareShare
ReportReport
Posted on 17 May 2023 03:51:06 by 32

I am getting this error and have tried as many provided work arounds in other similar chats as I can, but none of them are working. I've recreated the flow from the start with no change, and have tried convert from path as well - still errors. Please let me know if you can see anything that will help - the flow is taking responses from MS Form, putting them into a Word template with quickparts, saving then converting to PDF and emailing to the responder. I have been using this flow for years with occasional kinks when something in PowerAutomate updates/changes, but am at a loss for how to fix.

This is where I get the below error:

Nikola2_1-1684295421872.png

INPUTS
{
    "host": {
        "connectionReferenceName""shared_onedriveforbusiness",
        "operationId""ConvertFileByPath"
    },
    "parameters": {
        "path""/2022 Educator Capability Days/2023 May 31/testingtestingBringing Industry to the Training Environment.docx",
        "type""PDF"
    }
}

 

OUTPUTS

{
    "statusCode"415,
    "headers": {
        "Pragma""no-cache",
        "Transfer-Encoding""chunked",
        "x-ms-request-id""bc5a49b1-d240-49e1-a0d5-e8b85bc26cbc",
        "Timing-Allow-Origin""*",
        "x-ms-apihub-cached-response""true",
        "x-ms-apihub-obo""false",
        "Cache-Control""no-cache",
        "Date""Wed, 17 May 2023 02:25:07 GMT",
        "X-AspNet-Version""4.0.30319",
        "X-Powered-By""ASP.NET",
        "Content-Type""application/json",
        "Expires""-1",
        "Content-Length""717"
    },
    "body": {
        "status"415,
        "message""Error from Office Service. Url=https://wordcs.officeapps.live.com/document/export/pdf HttpCode=UnsupportedMediaType cert=subject:;thumbprint: ResponseHeaders=X-ErrorCode: WordDocumentHasMetroTemplateContentNonMetroTemplateExtension\r\nX-ClientCorrelationId: bc5a49b1-d240-49e1-a0d5-e8b85bc26cbc\r\nX-ServiceCorrelationId: bc5a49b1-d240-49e1-a0d5-e8b85bc26cbc\r\nX-ErrorCategory: NotSupported\r\nX-IsRetriable: False\r\nX-ConversionTimeInMs: 125.0045\r\nX-FileDownloadTimeInMs: 781.2629\r\nCache-Control: private\r\nDate: Wed, 17 May 2023 02:25:07 GMT\r\nServer: Microsoft-IIS/10.0\r\nX-AspNet-Version: 4.0.30319\r\nX-Powered-By: ASP.NET\r\n",
        "source""api.connectorp.svc.ms"
    }
}
  • Neeta Profile Picture
    2 on 24 Jul 2024 at 12:00:52
    Error: Convert file to PDF
    Hi 
     
    I am also facing same type of error. i was trying to convert doc file into pdf but certainly it is not happening.
    Please help me in this.
  • Mikee7891 Profile Picture
    Microsoft Employee on 06 Mar 2024 at 18:13:56
    Re: Error: Convert file to PDF

    hi @ViditGholam ,

     

    I am using the When a file is created trigger and is using a dynamic content File ID. Here's how it looks like.

     

    Mikee7891_0-1709748737714.png

     

     

    I tried replicating your flow with the same parameters and a test file. In Modern view this is what copilot is telling me. But the file is in the OneDrive folder.

     

    Mikee7891_0-1709771711591.png

     

    This is what the flow looks like.

    Mikee7891_1-1709771774029.png

     

     

     

  • VIDIT Profile Picture
    666 on 05 Mar 2024 at 05:23:58
    Re: Error: Convert file to PDF

    Hi @Mikee7891
    I uploaded a DOCX file to one drive 

    ViditGholam_1-1709616080747.png

    my looks like this

    ViditGholam_2-1709616126255.png

    final output 

    ViditGholam_3-1709616209158.png

     

    Hope this helps.

     

  • VIDIT Profile Picture
    666 on 05 Mar 2024 at 05:23:53
    Re: Error: Convert file to PDF

    Hi @Mikee7891
    I uploaded a DOCX file to one drive 

    ViditGholam_1-1709616080747.png

    my looks like this

    ViditGholam_2-1709616126255.png

    final output 

    ViditGholam_3-1709616209158.png

     

    Hope this helps.

     

  • Mikee7891 Profile Picture
    Microsoft Employee on 04 Mar 2024 at 22:50:57
    Re: Error: Convert file to PDF

    I'm trying to build a simple flow that automatically converts a docx file saved in a folder in my Onedrive into a PDF and save it in a Sharepoint location, but I keep getting an error message at the conversion step. 

     

    Error from Office Service. Url=https://wordcs.officeapps.live.com/document/export/pdf HttpCode=NotFound cert=subject:;thumbprint: ResponseHeaders=Connection: close
    Date: Mon, 04 Mar 2024 22:49:12 GMT
    Server: Microsoft-IIS/10.0
    X-Powered-By: ASP.NET

  • Nikola2 Profile Picture
    32 on 18 May 2023 at 05:44:07
    Re: Error: Convert file to PDF

    Thanks @ViditGholam , great point I'll look into that! 

    Cheers 🙂

  • VIDIT Profile Picture
    666 on 18 May 2023 at 05:28:48
    Re: Error: Convert file to PDF

    Hi @Nikola2 

     

    Happy to help!

    One more tip instead of creating a file in SharePoint first and then updating it you can just create a word template. and then use populate word document and save it directly to one drive and then convert it, this currently flow will bloat your storage as you are storing the same file twice.

  • Nikola2 Profile Picture
    32 on 18 May 2023 at 05:23:00
    Re: Error: Convert file to PDF

    Thanks so much @ViditGholam , that worked and everything ran properly - I feel a bit silly now as I should have tried that in troubleshooting!
    Cheers 🙂

  • Verified answer
    VIDIT Profile Picture
    666 on 18 May 2023 at 05:15:20
    Re: Error: Convert file to PDF

    Hi @Nikola2 , 

     

    I think you need to pass document type here it should ne {Name}.docx

    ViditGholam_0-1684386911636.png

     

  • Nikola2 Profile Picture
    32 on 18 May 2023 at 04:15:40
    Re: Error: Convert file to PDF

    Hi @ViditGholam , sure thing here are all the images. I've been using this flow successfully for 3 years now haha. Very frustrating when I have to create a new one for a new form/event and this happens!

     

    Nikola2_0-1684383272535.png

    Nikola2_1-1684383288027.png

     

    Nikola2_2-1684383316141.png

     

    Nikola2_3-1684383335706.png

    Nikola2_4-1684383352063.png

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,089 Most Valuable Professional

Leaderboard

Featured topics