In this post let us learn how we can export email to Onedrive using Power Automate. Most of them knows that the emails can be saved to file explorer or shared drive or Onedrive for future reference. Here let us see how we can use Power Automate to export the emails of high importance to Onedrive folder.
Let’s start building Power Automate Flow
When a new email arrives (V3) – Auto Trigger
Let us start with the auto trigger which triggers whenever a new email arrives at the configured user’s inbox. Here we have configured the trigger actions with some more options explained below. We can also use other options like export email only with attachments, emails having particular subject etc.
- Folder: Inbox
- To: User email addresses
- Importance: High
Export email (V2) – Export email as binary
Next action is use the Export Email action to export the new email as a binary. There is only one argument to be passed which is the Message Id retrieved from the trigger.
Create File – Creates an eml file in Onedrive
Next action is to use the Create file action to create an eml file in the configured Onedrive folder. Below are the 3 mandatory arguments that has to be given
- Folder Path: Path in user’s onedrive to save the email
- File Name: Filename of the eml to be saved. Here we have used the expression Concat to combine the subject and the extension .eml. Make sure you append the filename with extension.
- File Content: Binary output from the above action
Conculssion & What’s next?
Thats it, the flow is very simple. Once you are done with the above action, try send an email to the configured user’s inbox with high importance if specified. Once the flow ran, check the configured Onedrive folder and you should be ablve to find the eml file created.
The above scenario is very useful for users who would like to keep track of specific emails in separate folders for future reference. Also, there is one drawback of this flow is when an email with attachments is saved to Onedrive the attachments must be saved to separate folder and cannot be stored or embeded with email as a .eml file. The later will be covered in the next post. So keep learning.
I would really appreciate the comments and any issues are solutions that you would like to post.
Cheers. Happy Flowing…