Hi all,
Totally new to Power Automate, a support ticket has prompted me to get to grips with it quickly. I've managed to use a pre-built template to setup a flow that will grab pdf attachments and save them to a SharePoint folder - The flow I have currently works, but only if the pdf file has been sent with the filename of pdf in lowercase, like so: MyDocument.pdf
If the document is sent like this: MyDocument.PDF the flow says it completes but what I actually get is a false expression result and the document does not save.
What I am trying to do and failing miserably with is just add the 'Or' flag to the flow so that it will look for both but it doesn't seem to be working and I'm hoping some Power Automate wizard can help tell me where I'm going wrong.
The top image is the new one that I want to get working that currently fails - the bottom image is the same flow minus the 'Or' condition which works but only if the document has lowercase .pdf in the filename
Thanks in advance for any help
Nate
Hi henkenTech,
Thanks for the response and recommendation - I was just testing it all out before coming back to you.
Strangely the flow now works in that it will save the document no matter whether the filename is uppercase or lowercase but it does not convert to lowercase
Either way certainly resolved the issue for me, many thanks for such quick response!
Hey there - no problem.
You can use functions in any dynamic field. In your case you would use it here:
To insert a function, click on the "Expression" tab in the dynamic data picker:
Then paste exactly:
toLower(item()['name'])
and click OK. item() takes the current attachment from the For Each and ['name'] tells the function to use the attachment name.
See if that works for you 👍
Hi henkenTech!
Thanks for the quick reply - I suspect so but you'll have to forgive me as I don't know what that function is or where to apply it.
I presume it just saves the document in all lowercase rather than as it appears when it hits the flow? If so then I think it would only work adding it in before the condition?
Would appreciate any guidance on how to achieve it if so as I'm fairly confident that would resolve it for us, we aren't precious about keeping the filenames uppercase.
Thanks
Hey there,
in these cases, I tent to use the toLower function on the file name to make everything lowercase and then you just need one condition.
toLower(triggerOutputs()?['body/{FilenameWithExtension}']))
contains ".pdf"
Would that work for you?
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2