Use Power Automate Flow to send an email in outlook when a record is created, we can send an email using the outlook connector.
Scenario
![latpow.drawio https://dvmske.com/wp-content/uploads/2023/06/latpow.drawio.png](https://dvmske.com/wp-content/uploads/2023/06/latpow.drawio.png)
- We have a requirement, that when a case is created and if the case title contains DVMSKE, then send an email in outlook to the owner of the case.
- We will create an automated cloud flow, which will trigger when a new case is created.
Steps
- Navigate to http://make.powerapps.com .
- Create a Flow
First, create an Instant cloud flow.
On the left side of your dashboard, click on the My flows and then click on the “+New Flow” button, and select “Instant Cloud Flows” which is under New Flow
![1automate https://dvmske.com/wp-content/uploads/2023/06/1automate.png](https://dvmske.com/wp-content/uploads/2023/06/1automate.png)
- Click on skip button.
![2Autom https://dvmske.com/wp-content/uploads/2023/06/2Autom.png](https://dvmske.com/wp-content/uploads/2023/06/2Autom.png)
- Click on untitled and give the name to your flow.
- Select the dataverse connector ”
When a row is added, modified or deleted.
- Change type should be “added”.
- Table name will cases.
- Scope as organization.
![4 powerautomate https://dvmske.com/wp-content/uploads/2023/06/4-powerautomate.png](https://dvmske.com/wp-content/uploads/2023/06/4-powerautomate.png)
Click on “new step”, select connector as “microsoft datverse” and action as “get a record by id”.
- Select table name as “cases”.
- Row id should the “case”(unique identifier from the trigger body action).
![5 powaut https://dvmske.com/wp-content/uploads/2023/06/5-powaut.png](https://dvmske.com/wp-content/uploads/2023/06/5-powaut.png)
Get the owner record – Click on add new step. Select Dataverse as connector and select get a row by id action.
- In the table name select “users“.
- In the row id select “Ownervalue(from get a recod by id)“
![6 poweraut https://dvmske.com/wp-content/uploads/2023/06/6-poweraut.png](https://dvmske.com/wp-content/uploads/2023/06/6-poweraut.png)
Condition to check Case title contains DVMSKE- Click on Add new step. Select connector as control and action as condition.
- Choose Case Title (from get a case by id).
- Operator as contains.
- Value as DVMSKE.
![7 power aut https://dvmske.com/wp-content/uploads/2023/06/7-power-aut.png](https://dvmske.com/wp-content/uploads/2023/06/7-power-aut.png)
Send the email in outlook- In the yes block click on add an action. Search for office365 outlook connector. And select the send an email(V2) action.
- In To select Primary email from get a row id2
- In Subject add the subject you want to add for email
- In the body add the body of the email
- In From select who is sending the email, I select my dvmske id.
![8 poweraut https://dvmske.com/wp-content/uploads/2023/06/8-poweraut.png](https://dvmske.com/wp-content/uploads/2023/06/8-poweraut.png)
Click on Save.
![9 powaut https://dvmske.com/wp-content/uploads/2023/06/9-powaut.png](https://dvmske.com/wp-content/uploads/2023/06/9-powaut.png)
Output
Created a case.
- Owner is Anurag Tyagi.
- Case title is “DVMSKE case“.
- Click on save.
Email will send from anuragtyagi@dvmske.com to owner of case (here owner is only me that’s why sending to me).
![output poweraut https://dvmske.com/wp-content/uploads/2023/06/output-poweraut-1.png](https://dvmske.com/wp-content/uploads/2023/06/output-poweraut-1.png)