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 / Convert Word Document ...
Power Automate
Answered

Convert Word Document to PDF

(0) ShareShare
ReportReport
Posted on by 266

I've created a form where responses populate a word doc template and create a file in SharePoint.  This all works fine.  The next step should convert the document to a pdf, but I get an error that says --The selected file doesn't exist, please select a valid file and drive.  clientRequestId: 0b8924ab-4efe-47c3-991e-a8672fc6386e-- at the 'Convert Word Document to PDF step', However, it does exist.  I'm not sure what I'm doing wrong.  Below are some pictures of my flow up to that step.  Note: in the 'Convert to PDF' step, I've tried, from the 'Create File' step: ID, Name, and DisplayName.

1.png2.png

Categories:
I have the same question (0)
  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at

    Hi @Mike44 

    after you create the file and before you start conversion can you add delay action ( may be a min) between  so file is ready for conversion

    Shujaath_Khan_2-1657821455890.png

    extra, and also instead of utcNow() can you change it to utcNow('yyyy-MM-dd') ignore if not needed

     

    Thanks
    Please click Accept as Solution on this reply if it helped to solve your issue, and thumbs-up if you feel this is useful or important in other ways as a boost.

  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on at

    Hello @Mike44 ,

    in the “Convert to Word Document to PDF” you’ve to search for the file identifier instead of the name.

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    BR,

    Marco

     

     

  • Mike44 Profile Picture
    266 on at

    Added the delay and still the same results.  Below are the input and output, as well as evidence the file exists:

    Input
    {
    "host": {
    "connectionReferenceName": "shared_wordonlinebusiness",
    "operationId": "GetFilePDF"
    },
    "parameters": {
    "source": "groups/87b0142a-9021-4b6b-971d-4c9dc1c1a289",
    "drive": "b!rfdGDOykRkOwSCfz6SzRuj1KuB7dnSZDuOxaMS6mOhQjwK5hxGOxSYKvS7ggoiln",
    "file": "Maintenance request 231 Sullivan 2022-07-14T18_07_37.9182508Z.docx"
    }

    Output
    {
    "statusCode": 400,
    "headers": {
    "Pragma": "no-cache",
    "x-ms-request-id": "bd76c020-9413-4183-b422-5535a4f49f58",
    "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
    "X-Content-Type-Options": "nosniff",
    "X-Frame-Options": "DENY",
    "Cache-Control": "no-store, no-cache",
    "Set-Cookie": "ARRAffinity=430fde32acf620e94447c7e2e59908644804523c09f9a09b2273e2becc212387;Path=/;HttpOnly;Secure;Domain=wordonlinebusiness-usgv.azconn-gcc-usgv.p.azurewebsites.us,ARRAffinitySameSite=430fde32acf620e94447c7e2e59908644804523c09f9a09b2273e2becc212387;Path=/;HttpOnly;SameSite=None;Secure;Domain=wordonlinebusiness-usgv.azconn-gcc-usgv.p.azurewebsites.us",
    "Timing-Allow-Origin": "*",
    "x-ms-apihub-cached-response": "true",
    "x-ms-apihub-obo": "true",
    "Date": "Thu, 14 Jul 2022 18:08:41 GMT",
    "Content-Length": "350",
    "Content-Type": "application/json",
    "Expires": "-1"
    },
    "body": {
    "status": 400,
    "message": "The selected file doesn't exist, please select a valid file and drive.\r\nclientRequestId: bd76c020-9413-4183-b422-5535a4f49f58",
    "error": {
    "message": "The selected file doesn't exist, please select a valid file and drive."
    },
    "source": "wordonlinebusiness-usgv.azconn-gcc-usgv.p.azurewebsites.us"
    }
    }

    s1.png

  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at

    Also try @MarconettiMarco inputs 

  • Mike44 Profile Picture
    266 on at

    I don't have an option to select 'file identifier' or 'identifier' in the dynamic content.  I've tried 'ID' and get the same results.

  • Verified answer
    Mike44 Profile Picture
    266 on at

    I finally have this working, however I could not get it to work using the 'Convert Word Doc to PDF' premium- Word Online (Business), which I do have an account for.  I had to use the OneDrive for Business - Convert file (Preview) in order to get it working.  Below is a screen shot of my flow.  More steps, but it works.

    s1.png

     

    s2.png

  • kevinlowe Profile Picture
    66 on at

    I realize this was a long time ago, but I faced similar issues and really needed to avoid One Drive. My process worked, finally, and here was the solve: In the Convert Word step, in File it should be / then the Name output from the create file in sharepoint step (it wants a path to the file relative to the document library root). I also needed to be sure the filename when I then saved the converted document back to SharePoint wasn't just the Name output, because I just get a word doc because that is the filename when I created the first Word doc. So I needed to ensure the filename is just recreated and instead of .docx on the end of it, place .pdf. Works great. Thanks, Kev

  • NicoleEggert Profile Picture
    13 on at

    Hey Mike44,

     

    can you unfold this actions?

     

    Thanks a lot

     

    Regards

    Nicole

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Your solution works! Basically, I compress the file under 100 MB and add .pdf to the file name at the create a file.

    Thank you so much. I really appreciate it!

  • cjnunn Profile Picture
    52 on at

    THANK YOU! This worked perfectly!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 612

#2
Valantis Profile Picture

Valantis 344

#3
11manish Profile Picture

11manish 326

Last 30 days Overall leaderboard