Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
550 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | Power Automate (21 exercises) |
Topic ==> | Apply to each loops (3 exercises) |
Level ==> | Relatively easy |
Subject ==> | Power Automate and PAD training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
The aim of this exercise is to delete all of the emails about a given subject from Outlook. It may seem a long exercise, but that's because it gives you lots of help on the way!
For this example, we'll delete all the emails containing the word Action from our inbox, but you should choose your own subject text to search by.
Start by creating a manually triggered flow called Exercise NN - Delete selected emails, and add an input to this trigger:
Add a text input: this is where you'll type the text you want to search by when you run your flow.
Add an action to get all of the emails from your inbox:
See below for how to configure this.
Make sure that this action is getting all of your emails (and not just the ones you haven't read), and set the Top parameter to the maximum 25:
If you delete the Top parameter entirely the flow still seems to loop over just the first 10 emails.
Now add an Apply to each action, and set this to loop over the emails returned from the previous Get emails action.
Within this Apply to each action, add a condition:
This condition should test each email's subject.
Set your condition to test whether the curent email's subject contains the text you'll type in when you run the flow:
You can find the Input dynamic content mixed up with all of the other dynamic content for the initial trigger.
If the condition is True, add an action to delete the email:
When choosing which email to delete you may need to click on the See More link shown above to see and select the current message id (if you're using the new flow designer, that is).
Run your flow to test it:
Choose which emails you want to delete by typing in part of their subject line.
You can't undo emails that you delete in this way, so make sure that you really DO want to delete these emails (and be prepared for the fact that if your flow contains a bug you may end up deleting the wrong emails!).
Sigh with satisfaction at a flow well written, and return to your Power Automate home screen.
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.