cancel
Showing results for 
Search instead for 
Did you mean: 

Share Multiple Attachments of SharePoint List via Email using Power Automate

I have written an article here on how to share multiple attachments via Email using Power Automate.

Let us have a look at a detailed steps to implement this .


Step 1 – Create the blank Microsoft Flow

  • Go to flow.microsoft.com, sign in with your work or school account, click on My flows menu in the left navigation bar, and then click on ‘+New’ and Select Instant – from blank.
     

    capture1-3.png

  • Click on the Skip option given below and then give the flow name at top left in next screen.
     

    capture2-1.png

Step 2 – Select a Trigger point of the Flow

  • Search for the appropriate trigger when you want the flow to initiate. 
  • Here, we will select the trigger as ‘When an item is created’ which means that the flow will run whenever a new item is created in selected SharePoint list.
     

    capture4.png

  • Select the Site Address and List name where an item will be added along with the attachments.
     

    capture5.png

Step 3 – Initialize Variable and Get List Attachments

  • Click on +New Step and Choose an action ‘Initialize Variable’.
  • Give the variable name say ‘AttachmentArray’ of type Array which we will use to create an array of all the attachments of newly created item.
     

    capture6.png

  • Now, add another action ‘Get attachments’ and select the Site Address and List name .
  • Set the Id to ID of When an item is created trigger from the Dynamic content which appears in right as shown below.
     

    getattachments-1.png

Step 4 – Read Attachments Content and Create an Array

  • Add an action ‘Get attachment content’ and select the Site Address and List name .
  • Set the Id to ID of When an item is created trigger from the Dynamic content which appears in right.
  • Set File Identifier to Id of Get attachments from the Dynamic content as shown below.
  • As soon as you set the File Identifier , an Apply to each loop will be added automatically in order to get the attachment content of each file.
     

    attachmentcontent-1.png

  • Add ‘Append to array variable’ action after Get attachment action and within the Apply to each loop.
  • Select the variable ‘AttachmentArray’ as Name which we have created at the beginning of the flow.
  • Set the Value to the following JSON  where 
    Name –  will be the DisplayName of Get attachments
    ContentBytes – will be the Attachment content of Get attachment content.
     

    appendtoarrayvar-1.png

{
  "Name": @{items('Apply_to_each')?['DisplayName']},
  "ContentBytes": @{body('Get_attachment_content')?['body']}
}

Step 5 – Send attachments via Email

  • Finally, add an action ‘Send an email (V2)’.
  • Set the values of To, CC and BCC to whom you have to send an email and add Subject, Body .
  • Set the From(Send as) value to the Email address to send mail from if needed else the mail will be sent from the person whose connection is set in the flow.
  • Set the value of Attachments to AttachmentArray variable.
  • Set the Importance to Low, Normal or High if needed.
     

    sendemail-1.png

That’s all, the flow is ready in few simple steps.

 

flow (1).png


Now, let us check how the flow will work .


Add a new item in the SharePoint list along with the multiple attachments .
I have created an item and added 2 attachments with it .


An Email is received having the attachments as shown below –

output.PNG

Comments

Hi @Diksha interesting article just wondering how I would add attachments from a Microsoft form submission to an approval email? Or am I best building 2 flows one to add the data to a list and then another to email off the attachments in an approval flow? 

 

Many Thanks

Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, TechCommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 12 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – https://kamdaryash.wordpress.com Youtube channel - https://www.youtube.com/channel/UCM149rFkLNgerSvgDVeYTZQ/