One way to do it is to create a seperate flow with two input variables.
In my example there are two input variables called pptxdoc and pdfdoc.
I called the standalone flow pptxtopdf and it contains one call to powershell
---------- Paste below into a new flow, create the two input variables and save it----------
Scripting.RunPowershellScript Script: $'''$powerpnt = New-Object -ComObject PowerPoint.Application
$doc = \"%PPTXDoc%\"
$saveaspath = \"%pdfdoc%\"
$openDoc = $powerpnt.Presentations.Open($doc,[Microsoft.Office.Core.MsoTriState]::msoFalse,[Microsoft.Office.Core.MsoTriState]::msoFalse,[Microsoft.Office.Core.MsoTriState]::msoFalse)
$openDoc.SaveAs($saveaspath , [Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType]::ppSaveAsPDF,[Microsoft.Office.Core.MsoTriState]::msoFalse)
$openDoc.Close()
$powerpnt.Quit()''' ScriptOutput=> PowershellOutput ScriptError=> ScriptError
---------- Do NOT paste this line and the text below into pad ----------
Now you have a way to convert pptx files into pdf by calling the desktop flow you just saved, with two parameters (And you can reuse it in all your scripts, in the future)
