How is your day going so far? Mine is okayish. It’s been raining since yesterday, so the weather is on & off. Yeah, it rains in Summer in South Africa! We are also in adjusted lockdown with curfew during the night, hopefully that should go soon. I am waiting for international flights to start as well. And I am keeping myself busy exploring Power Automate Desktop & enjoying it. I am glad I started it.
Are you exploring power automate desktop? Had a chance to install the Power automate Desktop? No, then you may wish to visit this too.
And the first thing that I always try is sending email via outlook. Why? Because –
- It is an easy option to try with 100% chances of success
- You get an email confirmation of the test
- You have successfully achieved and did something
- You are not on Step Zero anymore
- Your confidence is high
- You are fully motivated
- And, now you have more ideas bursting to try out
So, here I am sending an email to myself to test & try out, plus we will together learn something by the end of the blog.
Launch your Power Automate Desktop, this could be either via a shortcut on your desktop or via the Start menu. Now click on the “+ New Flow” symbol & give it a name. I am naming it as POC_Send Outlook Email. It will launch the designer option for us to start working.
You will notice the below options under actions.
Let us drag & drop the Send email through Outlook action to the Main flow & it should look something like below. It immediately asks you to fill in the details.
Note – If you close this window without filling in the details, you will back to the blank designer.
Fill in your email address in Account, Send From & To. In real life scenario, this could be even an email address for the service account. Fill in the Subject & Body of the email that you wish to send.
If you leave Outlook Instance empty it will show you an error
Opening the same action would inform us two things –
- Outlook instance cannot be empty.
- And specify this in Launch Outlook action
Let us drag & drop the Launch Outlook action & we see that it has created a variable automatically for us. If you wish to rename the variable, double click & update it.
Note – The variable name is between %<variable name>%
Moving now to the ‘Send email through Outlook’ action, we can easily use this variable in the Outlook instance. This looks like defining the object & then using it to avoid “Object reference not set to an instance of an object”.
Let us re-order the action by moving the launch action to position 1 & should look something like below.
- All the variables used would be listed under Flow variables along with the count.
- All the actions are listed under Main flows by default. The footer will also tell you about the
Any selected action, Number of actions, number of subflow, and any delay that you would have done (in millisecond)
Default is 100 ms.
Now once the email has been sent, we also want our outlook instance to be closed. You could say it disposing of/recycling the object.
Drag & Drop the ‘Close Outlook’ action & it should look something like below.
Let us save our flow first & run it, and you should get notified about the same.
While running the flow, notice the Status changes from Ready to Running and the timer appears (in footer bottom left corner)
If your flow was successful, you should have received it by now.
Things to notice –
- When you are working with the flow, the status on the main window changes to Currently editing from Not Running.
- You can not rename your flow in the edit mode.
- You can not delete your flow in the edit mode.
- You can do following with your flow when it is not running –
- Status of flow currently you are working on could be –
That is all my findings so far. I have enjoyed writing this piece. I will update this in case I may have missed anything. Hope this helps.
Keep reading, keep enjoying, keep exploring!