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 Automate - Building Flows
Answered

Error when converting Word doc to PDF when using a variable

(0) ShareShare
ReportReport
Posted on by 248

Hello.

 

I have a flow that converts ms word business to pdf.  The flow has several ms templates and based off of the template type, it generates the pdf.  I am receiving the following error at the Convert to PDF node:

Conversion of this file to PDF is not supported. (InputFormatNotSupported / Bad request)

 

I'm using the following variable in the Create file in Onedrive File Content:

if(equals(triggerOutputs()?['body/TemplateID'], 'Perf Term', outputs('Perf_Term_template')?['body'],

outputs('Term_Policy_template_')?['body']))

 

It works fine if i dont use the variable.

Misa_0-1682964788404.png

 

Thank you for assistance!!

I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at
    Re: Error when converting Word doc to PDF when using a variable

    Hi @Misa ,

     

    Please put the actions ('Create file' and 'convert' file) in the branch of Switch.

    vxiaochenmsft_0-1683078868576.png

    Then remove if function in the expression.

     

    Best Regards,

    Wearsky

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 722 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 461 Moderator

#3
developerAJ Profile Picture

developerAJ 283

Last 30 days Overall leaderboard