cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Delete ALOT of emails

Greetings. Using SharePoint, I set an Alert on a Document Library to immediately, anytime ANY changes happen, send me an email. I did that several weeks ago and forgot about it. This morning, I made several thousand changes to the above mentioned Doc Library. Needless to say, my email inbox is overflowing. I've turned the alert off (my Bad) Now I need a quick way to delete the email messages. I'm assuming it's something like Get Messages, Dump into Array, Apply to Each-Delete. I've tried something along those lines, but can't seem to get anything to Dump into an Array Variable. Can someone show me the steps to find all emails in my INBOX that have come from 1 certain email address? I'd be grateful.
2 ACCEPTED SOLUTIONS

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @Anonymous,

 

Do you want to delete emails from a specific email address?

Please check the following flow configuration for a reference.

Add the trigger Button. You may change it to other triggers to your scenario.

Add the action Get emails. Input the following code into the Search query box to search emails from a specific email address. Input the max value 25 into Top field.

Add the action Delete email, select dynamic content Message Id from the previous action.

A screenshot for your reference.

1.PNG

Besides, this doc on $Search query for your reference:

https://docs.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/complex-types-for-mail-contacts-calendar#search-requests

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

I ended up using the "Sweep" option in O365 Outlook.  Very quick and fast.  Several thousand emails gone in several minutes.

View solution in original post

3 REPLIES 3
v-yamao-msft
Community Support
Community Support

Hi @Anonymous,

 

Do you want to delete emails from a specific email address?

Please check the following flow configuration for a reference.

Add the trigger Button. You may change it to other triggers to your scenario.

Add the action Get emails. Input the following code into the Search query box to search emails from a specific email address. Input the max value 25 into Top field.

Add the action Delete email, select dynamic content Message Id from the previous action.

A screenshot for your reference.

1.PNG

Besides, this doc on $Search query for your reference:

https://docs.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/complex-types-for-mail-contacts-calendar#search-requests

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I ended up using the "Sweep" option in O365 Outlook.  Very quick and fast.  Several thousand emails gone in several minutes.

sfos83
Frequent Visitor

If we want to use this over the 'sweep' function as helpfully offered, is there any way of deleting more than 25 emails at a time? That is the max and seems quite low for when you want to delete thousands

 

Thanks all

Steve

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,471)