<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=612681139262614&amp;ev=PageView&amp;noscript=1">
Skip to content

Need help? Talk to an expert: phone(904) 638-5743

Send SharePoint Attachments In One Or Multiple Emails With Power Automate (Ep. 6)

Send SharePoint Attachments In One Or Multiple Emails With Power Automate (Ep. 6)

Learn how to send one or multiple attachments from a SharePoint list using Power Automate! In this tutorial, Matthew Peterson walks through creating a flow that sends attachments via email when a new SharePoint list item is created. This is a fantastic solution for educators or professionals looking to automate their workflows effectively.

 

 

Scenario Overview

The use case involves a SharePoint list for lesson plans, where teachers upload attachments (lesson plans, quizzes, or tests). These attachments are then emailed to colleagues automatically whenever a new item is created in the list. This concept can be extended to any scenario requiring automatic email distribution of attachments.

Step-by-Step Guide

1. Set Up Your Automated Flow
  • Go to Power Automate and create an Automated Cloud Flow.
  • Select the trigger: "When an item is created."
  • Point the trigger to your SharePoint site and list.
2. Retrieve Attachments
  • Add the "Get Attachments" action to retrieve all attachments associated with the list item.
  • Use the "ID" dynamic content from the trigger to identify the correct list item.
3. Fetch File Content
  • Add the "Get File Content" action to retrieve the file data for each attachment.
  • This action automatically adds an "Apply to Each" loop, processing all attachments individually.
4. Send Attachments in Emails
  • Use the "Send Email (V2)" action to send an email for each attachment.
  • Attach files dynamically using the "File Content" and "Display Name" fields.

Advanced: Consolidating Attachments into One Email

To send all attachments in a single email:

  1. Initialize an array variable to store file names and contents.
  2. Use the "Append to Array Variable" action to build the array dynamically during the loop.
  3. Modify the email action to pass the entire array of attachments in the "Attachments" field.

This advanced method ensures all files are included in one email, streamlining the process.

Key Tips

  • Always use descriptive names for your actions to make debugging easier.
  • Check for common mistakes, such as missing JSON formatting (e.g., missing colons or quotes).
  • Test your flow thoroughly to ensure all dynamic content and logic are working as expected.

Conclusion

This step-by-step guide demonstrates how to automate sending SharePoint attachments via Power Automate. Whether you're an educator sharing lesson plans or a professional distributing documents, this flow saves time and improves efficiency. 

Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Automate and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.

Sign-up now and get instant access

Leave a comment

Free Community Plan

On-demand learning

Most Recent

private training

Hackathons, enterprise training, virtual monitoring