In this Power automate tutorial, we will see how to send an email from a Shared mailbox using Microsoft Flow. Let us check out an example on Power Automate send email from shared mailbox.
And also we will discuss the below Points:
- Power automate send an email from a Shared mailbox(v2)
- Power automate send email from Shared mailbox Html
Power automate send an email from a shared mailbox(v2)
Here we will see how to send an email via Shared mailbox to the recipient using power automate.
So here we will create a Microsoft flow that will send an email to the recipient with the attachments via a Shared mailbox.
For this, I have created a SharePoint list called Project management list. When a manager creates a new project/item and assigns it to the user, that user will get an email with an attachment from the shared mailbox.
Let’s check out the steps for Power Automate sending an email attachment from a shared mailbox.
Steps for Power automate send an email from a shared mailbox
Step 1: Create a list in SharePoint Online
I have already created a SharePoint list i.e. Project Management list having 7 columns with column types.
|Title||Single Line of Text|
|Comment||Multi-line of text|
Once your SharePoint online list is created we will create a flow in Powe automate.
Step 2: Create a flow in Power automate
Now we will create a flow that will send an email attachment to the recipient using a shared mailbox.
To create a flow, login to power automate, then click on create icon from the navigation bar, select automated cloud flow.
Now provide a flow name and then select the trigger ‘when an item is created ‘ to trigger the flow.
Step 3: When an item is created
In this step, Provide the site address and List name of the SharePoint List.
Step 4: Initialize a variable that will store an array of attachments
To initialize a variable, click on the next step and select the ‘Initialize variable’ action.
Now set the variable name as AttachmentArray and type as array.
Step 5: Get the List of attachments
In this step, we will get the list of attachments from the newly created project.
To get all the attachments of the project, click on the next step in Power Automate and then select the ‘Get attachments’ action.
Now in the Get attachments action, provide site address, list name, and id from the dynamic content to get all attachments of the newly created item in SharePoint.
Step 6: Read all attachment content
Click on the next step and select the ‘Get attachment content‘ action to read all the attachment content.
Also, read Power Automate Compose
In the get attachment content action, provide site address, list name, and id from dynamic content.
Next in the File identifier box, add the id of getting attachments from the dynamic content, after setting the file identifier, Apply to each loop action will be added automatically to the flow, in order to get all the content of each attachment.
Step 7: Append each attachment to an array
In this step, we will append the attachments to the ArrayAttachment variable.
So click on the next step and then select the ‘Append to array variable‘ action inside the Apply to each loop action.
In the Append to array variable action, set the name ‘AttachmentArray’ from the drop-down. Next in the value, create a JSON and set the value like the below image:
Step 8: Send an email attachment from Shared Mailbox
So to send an email from the shared mailbox, click on the next step outside the loop then select ‘Send an email from a Shared Mailbox (V2)‘ action.
Next, provide the original mailbox address, To, Subject, Body, and then click on the Show Advanced option, in the attachments set the AttachmentArray from the dynamic content.
Once your flow is ready we will move forward to test the flow.
Step 9: Run the Flow
To run the flow create an item in the Project management list with the attachment. After your flow ran successfully we can check the email.
Once your flow ran successfully you can check your mail, whether you get mail with attachments.
So, I got the below email from my shared mailbox.
Power Automate send email from shared mailbox HTML
Here we will see how to send email from a Shared mailbox with Html table using Power automate.
For this example, I have created a SharePoint list called Project Management list which we have used in the above example.
So at the end of every month, when the manager asks for status, we will send a monthly status of projects which are inprogress and completed.
If he/she wants to get the monthly status by auto-emailed from Shared Mailbox, then Microsoft flow create Html table, will be the best choice.
Steps to Power automate send email from Shared mailbox Html
Step 1: Create a flow in Power automate
In this step we will create a flow that will trigger on the monthly basis, to send the status of a project.
Login to Power Automate, then click on create icon from the navigation bar -> Scheduled Cloud Flow.
Next, provide the Flow name, Starting date and time, and interval to trigger the flow.
Step 2: Get Items from SharePoint List
In this step, we will get all the items from the Sharepoint list and filter the items based on the status Completed and in progress.
So, click on the next step, and then select Get items action.
In the get items provide the site address and list name of the sharePoint list. Then click on the Show Advanced options, then in the Filter query write the below expression.
Status eq 'In Progress' or Status eq 'Completed'
Step 3: Create Html table
In this step we will create an Html table, so for this click on the Next step then select ‘Create Html table‘ action.
Then in the From box provide the ‘value’ from dynamic content of Get items. Next click on Show advanced options, choose custom from the dropdown.
Then map the value, by adding a header with the value from the dynamic content to create an Html table.
Step 4: Html table styling
In this step, we will style the Html table, by using the compose action. So click on Next step, and then select Compose action.
Then in the Inputs box, write the below expression:
Step 5: Send an email from SharedMailbox
In this step, we will send an email to the manager from the Shared Mailbox, for this click on the Next step, then select the ‘Send an email from Shared Mailbox’ action.
Then provide the original mailbox address, To, Subject, and in the Body select the output- Compose action from the dynamic content.
Once your flow is ready, we will forward to run the flow manually.
Step 6: Run the Flow
To run the Flow, click on the save and run the flow manually in Power automate. Make sure contains some items, otherwise, the HTML table will be blank.
Once you have an item in the SharePoint list, check the flow to ran successfully.
Once your flow ran successfully, you can check the result in the outlook mail, the mail came from the Shared Mailbox.
You may like the following Power automate tutorials:
- Power Automate Get Data from Excel on SharePoint
- Power Automate Forms to Excel
- Power Automate create an HTML table
- Power Automate Switch case
- Power Automate send an email with an attachment from SharePoint
- Power automate approval reminder
- Power Automate String Functions
- Power Automate send email based on form response
In this Power automate tutorial, we learned how to send an email from a shared mailbox using Power automate. and also we discuss the below points:
- Power automate send email from shared mailbox
- Power automate send email from shared mailbox html
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