Power Automate: Working with Nulls and Empty Lists in SharePoint
Power Automate: Use Email Attachments to Update Power BI
In this video, Jonathan Silva demonstrates how Microsoft Power Automate, SharePoint, and Power BI can work together to automate a repetitive business process. The goal is to reduce manual effort by automatically saving email attachments to a SharePoint document library, which then serves as the data source for a Power BI report.
Jonathan begins by explaining a practical business scenario. He has a Power BI report built from sample superhero sales data. The report helps track purchases, team activity, totals, averages, and goals. While the report itself is already functional, the challenge comes from receiving new data regularly through email attachments. Instead of manually downloading each file and uploading it to a storage location, he wants the process fully automated.
This is where Power Automate becomes valuable. By creating an automated flow, Jonathan shows how users can save incoming email attachments directly into SharePoint. Since Power BI is already connected to that SharePoint folder, the report can then be refreshed to include the latest data with minimal effort.
The Business Problem
Jonathan focuses on a common reporting issue: new source files arrive frequently, and manually handling them wastes time. He wants a process where:
- Email attachments containing updated data are received automatically
- Those attachments are stored in a central SharePoint document library
- Power BI uses that SharePoint folder as its source
- The report can be refreshed to always display the latest information
This eliminates the need to repeatedly move files, re-upload documents, or manually organize incoming data.
How the Power BI Report Is Set Up
Before building the flow, Jonathan explains that his Power BI report is already connected to a SharePoint document library. Inside Power BI, he uses the SharePoint folder as the source and combines multiple files into a single table. This setup allows all incoming files stored in that folder to be merged into the dataset automatically.
He also mentions that this method works well when using the From Folder option in Power BI or Power Query, whether the files are stored on-premises or in SharePoint. Once that structure is in place, every new file added to the folder can become part of the reporting model.
Building the Power Automate Flow
Jonathan then walks through the process of creating the flow inside Power Automate. He chooses an Automated cloud flow and uses the trigger When a new email arrives from Office 365 Outlook.
To make sure only the correct emails are processed, he applies filters to the trigger. These settings ensure that the flow does not capture every email attachment in the inbox. Instead, it only processes emails that meet the defined criteria.
- Include Attachments is set to Yes
- Only with Attachments is enabled
- Subject Filter is set to match the expected email subject, such as “Super Hero Order”
Once the trigger is configured, he adds an Outlook action to Get Attachment. This action uses the message ID from the triggering email and the attachment ID from the incoming email content. Because an email may contain more than one attachment, Power Automate automatically wraps the action in an Apply to Each loop.
This means the process will repeat for every attachment included in the email, which is helpful when multiple data files are sent at once.
Saving the File to SharePoint
After retrieving the attachment, Jonathan adds the SharePoint action Create File. This is the step that stores the attachment in the desired SharePoint document library.
He configures the action by selecting:
- The SharePoint site
- The correct document library or folder path
- The file name from the original attachment
- The file content from the attachment itself
With this in place, every matching email attachment is automatically copied into SharePoint without any manual handling.
Testing the Solution
Jonathan tests the flow by sending himself an email with the expected subject line and attaching a sample file called Avengers Orders. After saving the flow, he runs a test and confirms that the email arrives successfully.
Next, he refreshes the SharePoint document library and sees the new file appear almost immediately. This confirms that Power Automate completed the process correctly and saved the attachment in the right location.
Finally, he refreshes the Power BI report. Because the report is already connected to that SharePoint folder, the new Avengers data is pulled into the model. The updated visuals now display the Avengers team in slicers, matrices, and other report elements.
Why This Integration Matters
Jonathan closes by emphasizing the value of integrating tools across the Microsoft Power Platform. With Power Automate handling file intake, SharePoint acting as the storage layer, and Power BI delivering the analytics, users can build a streamlined reporting pipeline that stays current with far less manual work.
This approach is especially useful for teams that receive recurring files by email and want a dependable way to keep reports updated. By combining automation with scheduled or manual Power BI refreshes, businesses can ensure decision-makers always have access to the most recent data.
Overall, Jonathan Silva presents a simple but powerful example of how automation can improve productivity, reduce repetitive tasks, and strengthen reporting processes using Power Automate, SharePoint, and Power BI.
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
ABOUT THE AUTHOR
Jonathon Silva is a Trainer for Pragmatic Works, specializing in the Power Platform. He graduated from James Madison University in 2011, has a master’s degree in Education, and comes with 9 years of teaching experience in high school economics and history. Jonathon has consistently been recognized as a top educator in the field of history and leader in curriculum development. His primary focus is helping our customers learn the ins and outs of Power Apps and Power BI.
Free Community Plan
On-demand learning
Most Recent
private training

Leave a comment