Do you want to send an email from a shared mailbox (V2) using Power Automate flow? This tutorial will help you to know how to send email from shared mailbox in Power Automate with an example.
Recently, I got a requirement to send an email from a shared mailbox(V2) action when a new task is created in the SharePoint list using Power Automate flow.
Before starting to create a flow, we have to create the SharePoint list. Here, I am going to use the below task list consisting of the following:
Column Name | Column Type |
Task Name | default title column |
AssignedTo | Person or group column |
TaskPriority | choice type |
TaskStatus | choice type |
DueDate | date type |
Similarly, make sure you have the Shared mailboxes here. I will use the below highlighted Shared Mailbox, with three members called (Adele Vance, Miriam Graham, and Patti Fernandez) with full permissions.
If you don’t have any Shared Mailbox, create one Shared Mailbox. You can log in to the Admin center->Teams & Groups -> Shared mailboxes and + Add a Shared Mailbox option.
Now, we will start creating the flow to send an email from a Shared Mailbox (V2) action.
Send an email from a shared mailbox (v2) in Power Automate
Let us see how to send an email from a shared mailbox (v2) in Power Automate,
Step-1:
Create an automated cloud flow with the trigger when an item is created and configure the required parameters:
- Site Address: select the SharePoint site from the dropdown
- List Name: select the list name from the dropdown
Step-2:
Select the initialize variable action from action triggers, enter the name, and choose the variable type as String.
Step-3:
Add a new step, then select the apply to each control and choose the Assigned To from the dynamic content values
Now, inside the loop, add a set variable action; from the dropdown, select the initialized variable, and in the value section from the dynamic content “Link to item”.
Add a new step: Send an email from a shared mailbox (V2) action from the action triggers. Provide the required parameters:
- Original Mailbox Address – Enter the original mailbox address from the suggested people
- To – From the dynamic content, select the enter the assigned to users
- Subject – Enter the subject of the mail
- Body – Enter the body of the mail
Step-4:
Before we test the flow, we have to configure the Shared mailbox to Outlook.
For that, Open Outlook -> Right-click on the folders, and choose the Shared Mailbox option. Enter the created Shared Mailbox display name or email address and click on the Add option.
Here, I have configured the created ShareMailbox to the Outlook account for the (Adele Vance) user.
Similarly, follow the above steps to configure the mailbox with Outlook account for the other two members presented in the Shared Mailbox (Miriam Graham and Patti Fernandez)
All three members in the Shared Mailboxes group are configured with the Shared folder with their Outlook account.
Step-5:
Save and run the flow. The flow will trigger when a new task is created, and in the assigned to field, enter the created shared mailbox ID as highlighted below:
Once the flow runs successfully, like the below:
All the members assigned presented in the Shared mailbox will receive a mail. The screenshot below shows that the user “Miriam Graham” received the mail in the Shared Folder inbox.
The screenshot below shows that the user Patti Fernandez received the mail in the Shared Folder inbox.
This is how to send an email from a shared mailbox (v2) in Power Automate.
Power Automate Send Email from Shared Mailbox HTML
Let us see how to send email from a Shared mailbox HTML using Power Automate.
In this example, we will create a flow that will trigger every week, to send the weekly status update to the Manager from the development team from Shared Mailbox.
Here, I am going to use the below SharePoint Task list:
Step-1:
Create a Scheduled flow that triggers every week; enter the Starting date time, and interval to trigger the flow.
Step-2:
Add a new step and choose to get items action to get all the items that are presented in the SharePoint list.
Step-3:
Add a new step choose the select data operation, In the Form section pass the values from dynamic content. Enter the key and Map the values.
For the Assigned To key, use the below expression as the value, because the Assigned To field has multiple values.
join(xpath(xml(json(concat('{"body":{"value":', item()?['AssignedTo'] , '}}'))), '/body/value/DisplayName/text()'), ', ')
Step-4:
Add a new step, select Create HTML table, and pass the output of the previous data operation in the Form section.
Step-5:
Add another compose data operation and use the below CSS code to apply the CSS for the created HTML table.
<style>
table, th, td {
border: 1px solid;
}
th {
background-color: #04AA6D;
color: white;
}
th, td {
padding: 15px;
text-align: left;
border-bottom: 1px solid #ddd;
}
</style>
Step-6:
Select a new step and choose the Send an email from a shared mailbox (V2) action, providing the required parameters.
- Original Mailbox Address – Enter the original mailbox address from the suggested people as shared mailbox
- To – select the enter the manager account from the suggested people (Here I have selected the manager account as Adele Vance)
- Subject – Enter the subject of the mail
- Body – Enter the body of the mail and then add the HTML table and the CSS outputs from the dynamic content value.
Step-7:
Save and run the flow; once the flow runs successfully, like below:
We can see that the Manager (Adele Vance) received the mail in the inbox:
In the Configured Shared mailbox folder, In the send items folder, we can see that the mail has been sent to the Manager account.
This is how to send email from a Shared mailbox HTML using Power Automate.
Conclusion
I hope you know how to configure and send an email from a Shared Mailbox using Power Automate flow.
I have shown you an example of how to send an email from a shared mailbox (V2) and receive an email to the Shared mailbox using Power Automate flow with different examples.
You may also like:
- How to Convert HTML to Text using Power Automate?
- How to Convert HTML to PDF in Power Automate?
- Power Automate Update SharePoint list item
- Save Office 365 Email Attachments to OneDrive for business using Power Automate
- Get Distinct Values from SharePoint List using Power Automate
Bhawana Rathore is a Microsoft MVP (3 times in Office Apps & Services) and a passionate SharePoint Consultant, having around 10 years of IT experience in the industry, as well as in .Net technologies. She likes to share her technical expertise in EnjoySharePoint.com and SPGuides.com