Sending email notification in Power Automate with attachment(s) from SharePoint list item

Cloudatica
2 min readDec 20, 2020

--

In Power Automate (Microsoft Flow), it’s very common to notify people about new items or modified items from SharePoint list e.g. Issue Tracking, Order approval etc. It gets a bit complicated when that item has multiple attachments and you also want to send those attachments in the email notification. Following video tutorial shows you how to implement this requirement:

What’ll you learn by building this?

By building this, you’ll also learn following concepts about Power Automate:

a) Array variables — Initialize & Append (to store the attachments)

b) Getting attachment content from SharePoint list is a 2 step process:

b.1) Get Attachments (list of attachments but not the content)

b.2) Get Content of each of these attachments (using Apply to each)

c) Right JSON format to use for each attachment

d) Including attachments variable in the sending email

e) Quick Testing

A very important takeaway from this tutorial

If you want to remember just one thing from this tutorial, remember that if you want to attach multiple files in “send email” step, you have to have an array consisting of JSON objects in a very specific format:

[

{

Name”: <Name of the attachment-1>,

ContentBytes”: <Content of the attachment-1>

}

,

{

Name”: <Name of the attachment-1>,

ContentBytes”: <Content of the attachment-1>

}

]

A related tutorial - SharePoint Attachments in approval workflow

In a related tutorial, you’ll learn how to implement something similar for Approval workflow with attachments, you’ll see that this JSON format needs to change. A bit weird but that’s how Power Automate expects it, so you have to comply with that requirement.

Subscribe to us to not miss these useful tips and tricks on Microsoft Power Platform — PowerApps, Flow (Power Automate), Common Data Service (Dataverse) etc.

For Training, 1:1 coaching, Newsletters, or Consulting help on Power Platform, Azure, or Data Science, please email us at hello@cloudatica.com or book a session at https://cloudatica.com Checkout our articles on https://cloudatica.medium.com

--

--

Cloudatica

Team of experts in Microsoft AI Stack (Copilot) and Power Platform. For consulting or training, reach out to us at hello@cloudatica.com