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.

Software ==> Power Automate Desktop  (18 exercises)
Version ==> Latest version
Topic ==> Emails and Outlook  (4 exercises)
Level ==> Average difficulty
Subject ==> Power Automate training
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

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:

Emails received

Your flow should send out 3 emails.

 

Here for example is what the Word email should look like:

Word email

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:

Setting 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:

Data table

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:

Action Notes
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. 

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only. Our Power Automate exercises answers are provided as text files - you can see how to assemble these back into PAD flows here.
This page has 0 threads Add post