Power Automate does not have left and right functions available as expressions. Here’s a workaround that I used to check if an email’s attachment file type is zip:
slice(variables(‘varString’),-4)
I found the solution in this discussion: https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-get-the-last-4-characters-of-a-string/td-p/1500549
You can also achieve the same end result with substring etc, but this slice was nice.