• Ajith Madathil

Email OneDrive files using Power Automate

Updated: Apr 1


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’.



0 views
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
This site was designed with the
.com
website builder. Create your website today.
Start Now