Hi, I'm trying to get a flow to convert to PDF but sometimes document might already be a PDF and needs to bypass the convert option. If it has to bypass the convert function, the "Create file" needs to look "Get file Content" instead of "Convert File". I'm trying to learn the expressions any help will be appreciated.
I attempted to write an expression but I'm struggling. It feels like it should be simple.
My current expression: if(body('Convert_file_2'),0,body('Get_file_content_2'),0) gives me this error
Unable to process template language expressions in action 'Create_file_4' inputs at line '0' and column '0': 'The template language function 'if' expects three parameter: the condition to test as the first parameter, the value to return if the condition is true as the second parameter, and the value to return if the condition is false as the third parameter. The function was invoked with '4' parameter(s). Please see https://aka.ms/logicexpressions#if for usage details.'.
Thank you in advance!
Solved! Go to Solution.
I got it to decide if the file is a PDF or not but when I go to "Create File," the flow does not know which choice to pull the information from.
So, above will work if the file is PDF there you can decide whether you skip the convert or need to convert
Also can you tell me what you want to do after that in detail?
Hi @GCGJH ,
The if() function expects three parameters, the first parameter should return a boolean, but you provided 4 parameters.
Maybe you could add a Create file Action to both branches of Condition Action
In addition, maybe you could try to use the following formula:
Hi @GCGJH ,
It seems that you found a way to achieve your needs.
Maybe you could consider marking your reply or mine as a 'Solution' to close the case.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!