Email OneDrive files using Power Automate
- Ajith Madathil
- Sep 8, 2019
- 1 min read
Updated: Apr 1, 2020
First step is the trigger. Here I am using a manual trigger.

The next step is to declare an array variable called FileContents. This is used for storing the filename and file content.

Next, we need to read the list of files in a folder from OneDrive. The Power Automate List files in folder step will give you the metadata of files.

Next we build a loop for reading each file from OneDrive. We store the filename and content bytes under the array variable.

Once the loop is executed successfully, we have all the files and their byte contents in the FileContents array.
Finally, we can use the action Send an email for sending the files.
Once the Send an email action is added you can see the below properties as default.

By default, you can attach one filename and content. By clicking Add new item will allow more files to be attached at one time.
Click the above highlighted icon to switch to input entire array so that we can set the FileContent array variable here.
This way we can set all the files and contents under a single property called ‘Attachments’.

Recent Posts
See AllMicrosoft Power Automate (aka Microsoft Flow) provides lots of action steps out of the box. My favourite one is Compose. What does it do?...
I have a SharePoint document library called aj, and inside of it, three folders (Test1, Test2 & Test3). I am going to build a flow to...
In this blog post I will access NASA's Astronomy Picture of the Day (APOD) API using Power Automate. The plan is to retrieve the picture...
Comments