Hi everyone! I'm building a logic flow using Logic Apps and I'm stuck on a condition action. I've created an email tracker that monitors incoming emails, and I want it to trigger an Azure Document Analyzer when an email attachment is a PDF. However, my condition is not working as expected. It seems to misinterpret when an attachment ends with .pdf, as it's returning 'False' instead of following the 'True' path to send it to the document analyzer. I'm not sure where I've gone wrong here! I've attached links to my expression and the current flow setup for reference. Any guidance would be greatly appreciated!
1 Answer
It looks like the issue is that your function using `endswith` evaluates to True, but you might be mistakenly comparing the result directly to ".pdf". Instead, just check if it evaluates to true and not compare it to .pdf. Use the run history to see how your logic is performing. That might clarify things for you!
I checked the run history, and it definitely shows a false evaluation. So if I understand your advice correctly, I basically need to change my condition to evaluate just the boolean result? I also tried doing 'not true' before, but that failed with an unclear error. Should I just list every other extension instead?