Hello Power Automate Community,
I'm trying to build an automation to automatically delete phishing and spam emails from my outlook.com junk mail folder, I get about 10+ a day and its just a pain to delete them all and block etc. So I tried to create an event that triggers whenever I receive a new email to my junk folder. It then looks at the 'From' and if 'it contains' 'McAfee' for example it should automatically delete the email. However, It keeps failing.
I tried changing the trigger to an hourly timer that basically get the top 20 emails from my junk mail and it still doesn't work.
This is the error I keep getting:
Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.


My power automate knowledge is pretty basic, I'm not 100% sure I'm inputting the search string correctly? I'd also like to know if its possible to input a blank string cos I get emails with no sender address and id like to block those as well. Anyway I've run out of ideas any help would be greatly appreciated. Thank you!