- Access exercises (91)
- C# exercises (79)
- Excel exercises (278)
- Power Apps exercises (13)
- Power Automate exercises (18)
- Power BI exercises (139)
- Power Platform exercises (157)
- Python exercises (28)
- Report Builder exercises (141)
- SQL exercises (198)
- SSAS exercises (51)
- SSIS exercises (46)
- SSRS exercises (99)
- VBA exercises (85)
- Visual Basic exercises (46)
POWER AUTOMATE EXERCISES▼
POWER AUTOMATE DESKTOP EXERCISES▼
Power Automate Desktop | Emails and Outlook exercise | Send emails out, each containing different set of attachments
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.
You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
The aim of this exercise is to send out one email for each type of file in the above folder. The recipient of your emails should see something like this:
Your flow should send out 3 emails.
Here for example is what the Word email should look like:
Each email should attach documents of the relevant file type.
Create a new flow called Attachments by file type. Copy the text from the file called Manifest.txt in the above folder and use this to set the value of a variable:
This creates a data table with column headings.
Have a look at the text of the expression you've just pasted in to check you understand it. The main obstacle to creating data tables like this (rather than reading them in from a file) is getting the syntax exactly right!
This is what this action should create:
The variable should contain the name and file extension for each file type that you want to email.
When you've run you flow to check that it gives you the data table shown, add an action to loop over the rows in this data table. For each data row:
|Get the files in the folder of this type||Use *%MyDataRowVariable['Extension']% as your file filter, to show all files of type *.docx, *.xlsx, etc. What this will do is to substitute in the value of the Extension column in for each different row in the data table (so the first pass through the loop will get all the files of type *.docx, for example).|
|Send an email out with these files as an attachment||You can embed %MyDataRowVariable['File type']% in your subject and body to customise each email.|
If you get this working (and still have time and energy), write a separate subflow to display an error message and stop your flow. Add an error block to your main flow which is triggered if Power Automate Desktop can't send your email (this error block should then call your separate subflow).
It should be easy enough to test your error block: just mistype the SMTP server name or some other detail!
Save your flow and close it down.