top of page

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 All
The Compose action

Microsoft Power Automate (aka Microsoft Flow) provides lots of action steps out of the box. My favourite one is Compose. What does it do?...

 
 
 

Comments


Blog Categories
 

Beginner

Intermediate

 

Advanced

Power Automate Essentials

How can I help you?

I am happy to help at any time.  You can contact me via the official PowerAutomate community forum.  Tag me (@abm) on any post you make there if you would like to me take a look at it.

I am always available for both corporate training or 1-2-1 training for individuals. 

© 2023 by Walkaway. Proudly created with Wix.com

  • Twitter Black Round
bottom of page