web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Building an Outlook.co...
Power Apps
Unanswered

Building an Outlook.com Spam FIlter

(0) ShareShare
ReportReport
Posted on by 6

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'.'.

 

t1m2k2_0-1659010445629.png

t1m2k2_1-1659010527622.png

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!

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @t1m2k2

     

    I tested a similar setup and don't have any issues. The only difference is that I'm using Get emails (V3). Perhaps changing that will fix your issue.

     

    BCBuizer_0-1659012323523.png

     

  • t1m2k2 Profile Picture
    6 on at

    I'll certainly give it a go! Cheers! I Cant seem to see V3 are you a premium user?

     

    Ahh that's an outlook 365 rule, I'm trying outlook.com... Starting to wonder if its because I'm not a power automate or outlook.com premium account...

  • BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @t1m2k2 ,

     

    I'm using an E5 license, but nothing premium. Unfortunately the Outlook.com connector is blocked, so I can't test that.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard