How do I add attachments to power automated?

In this Power Automate tutorial, we will learn how to send an email with an attachment from SharePoint using Microsoft Flow.

So here we will create a Microsoft flow that will send an email to the recipient with the attachment. Let us check out an example on Power Automate send an email with an attachment from SharePoint.

  • Microsoft Flow send an email with an attachment from SharePoint
    • Send an email with an attachment from SharePoint using Power automate

Here we will see how to send an email with an attachment to the recipient from SharePoint using Power automate or Microsoft flow.

I have created a Project management list in SharePoint and when a manager creates a new project/item and assigns it to the user with an attached document.

According to the Assigned to field value that person will get an email with all the attachments.

For example, if the XYZ project is assigned to user1, then user 1 will get all the attachments of that project.

Read Power Automate update SharePoint list item

Send an email with an attachment from SharePoint using Power automate

Here we will see what are the steps to send an email with an attachment from SharePoint using Power automate.

Step 1: Create a SharePoint Online list

Here I have created a Project management List in SharePoint Online having 6 columns with the required column type.

Column NameColumn Type
Title Single line of Text
Assigned to Person
Start Date Date and Time
End Date Date and Time
Status Choice
Budget Currency
SharePoint Online list

Power Automate send an email with an attachment from SharePoint

Once you create a SharePoint list for Project Management, next we will move to the next step to create a flow.

Step 2: Create a Flow in Power Automate

Now we will create a flow that will send an email with attachments from SharePoint using Power automate.

To create a flow, Login to Power Automate, then click on Create icon from the navigation bar, select Automate cloud flow.

power automate send email with multiple attachments

Now provide a flow name, then select the trigger “When an item is created” to run the flow.

send email with attachment in power automate

Step 3: When an item is created

In this step, we will provide the site address and list name to which you will assign the Project.

Power Automate send an email v2 attachment

In the next step, we will initialize a variable with the type array, to create an array of all attachments.

Step 4: Create a variable that will store an array of all attachments

Now to create a variable, click on the next step, then select initialize variable.

Power Automate send an email v2 attachment

Now, provide the name of the variable”ArrayAttachments”, and type Array. This array variable will use to create an array of all attachments of the newly created item.

microsoft flow send email with multiple attachments

Next step we will get the list of attachments from the newly created item.

Step 5: Get List attachments

To get all attachments, click on the next step, then select Get attachments.

Power Automate send an email with an attachment from SharePoint

Now provide the SharePoint site address, list name, and id from the dynamic content to get all the attachments of the newly created item.

Power Automate send an email with an attachment from SharePoint list

Step 6: Read all attachments content

To read all the attachment contents, click on the next step and then select the Get attachment content.

Power Automate send an email with an attachment from SharePoint list

Now provide the site address, list name, and id from the dynamic content.

In the File identifier, add the id of getting attachments from the dynamic content, after setting the file identifier, Apply to each loop will be added automatically in order to get the attachment content of each file.

send email with attachment in power automate

In the next step, we will append the attachment in the array of attachments.

Step 7: Create an array of attachments

To create an array, click on the next step then select Append to array variable action inside the apply to each loop.

flow send multiple attachments on a single email

Now select the variable AttachmentArray as the name, which we have created in Step 4.

Then set the value with the below JSON

  • Name: Set the display name from the dynamic content.
  • ContentBytes: Set the attachment content of the Get attachment contents from the dynamic content.

how to automate sending emails with attachments

Once we get the attachment content and append it to the array, in the next step send the email with the array of attachments.

Also, read, Power Automate Replace

Step 8: Send attachment via email

To send an email, click on add an action and select Send an Email V2 outlook.

Then provide the Email of the recipient i.e. Assigned to Email.

Set the Subject and Body of the Email. Then click on the Show Advanced option.

Power Automate send an email notification attachment

Then in the attachment section, click on the icon to switch to the entire array of attachments.

Power Automate send an email notification attachment

And then set the value of attachment to the AttachmentArray variable. Also, you can set the importance from low to high.

how to automatically send emails with attachments

Once your flow is ready, click on the save and test the flow manually by adding an item to the SharePoint Online list.

Step 9: Run the Flow

To run the flow we will add a project/item to the SharePoint list.

So here I have added a project “SharePoint Migration” with attachments and assigned it to user5, so user 5 will get an email.

Power Automate send an email with an attachment from SharePoint list

Now, user5 will get an email with attachments like the below screenshot.

Power Automate send an email with an attachment from SharePoint

And also you can check the flow in Power automate, that your flow ran successfully or not.

Power Automate send an email with an attachment from SharePoint

In this Power Automate tutorial, we learned how to send an email with attachments from SharePoint using Power Automate or Microsoft flow.

Related Power Automate tutorials:

  • Power Automate Switch Case Multiple Conditions
  • Power Automate update SharePoint list item
  • Move files from OneDrive for Business to SharePoint Online
  • Convert SharePoint document to PDF using Power Automate
  • Convert SharePoint list item to PDF using Flow or Power Automate
  • Power Automate create an HTML table
  • Power Automate Create a CSV Table

After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Out audiences are from the United States, Canada, United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a SharePoint MVP(8 times), check out My MVP Profile. I have also worked in companies like HP, TCS, KPIT, etc.

How do I send a PDF attachment in Power Automate?

Add Apply to each, Get attachment content. Note: select ID for Id from trigger, select Id for File identifier from action Get attachment. Within the apply to each, add action Append to array variable. Under the Apply to each, add action send an email..
Labels:.
Attachment..
send email..

How do I add an attachment in Microsoft flow?

Login to MS FLow using Office365 credentials..
Create from blank > When a file is created or modified..
Add "Get file Metadata" and provide the Identifier against File Identifier..
Add "Get File Content" and provide the Identifier against File Identifier..
Add a condition to check if "Get File Content" is not empty..

How do I add multiple attachments in Power Automate?

Simple flow.
Manually trigger flow..
Initialize variable..
Get item..
Get attachment..
Apply to each. Get attachment content. Append to array variable..
Send an email (V2).

How to add attachment to SharePoint list using Power Automate?

Create a new item in the list..
Get the file contents using OneDrive's “Get File content” action..
Add the file to the newly created item..

Postingan terbaru

LIHAT SEMUA