As a business user, while working with emails, you may want to move emails to a folder based on various conditions. In this tutorial, I will show you how to move email to a folder using Power Automate.
I will also show you the following:
- How to move an email to a folder after time using Power Automate
- Email archiving using Power Automate
- Move emails to a folder based on the subject using Power Automate
- Save emails to a SharePoint document library using Power Automate
Let us check one by one by implementing practically:
Table of Contents
Move Emails to a Folder After Time using Power Automate
Consider a scenario to move emails to a folder after 2 days of email received using Power Automate.
Check the screenshot below, these emails I received a few days back.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (1) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (1)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-move-email-to-folder.jpg)
I have created a new Outlook folder [Recent Emails] to move the emails after 2 days. The screenshot below shows empty emails.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (2) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (2)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-move-mails-automatically-to-a-folder-in-outlook.jpg)
Here, I will create a scheduled cloud flow that triggers automatically at a specific time. The flow will trigger every day and move emails older than 2 days.
Let us create the flow:
1. Log in to Power Automate, then click on Create and select Scheduled cloud flow -> Click on Create button.
Provide the parameters below:
- Interval: Select the number of intervals.
- Frequency: Choose the frequency according to your requirements.
- Time zone: Select the Timezone the flow should run.
- At these Hours: Choose the Hours when the flow should run.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (3) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (3)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-waiter-actions.jpg)
2. Now, to retrieve the emails from Outlook, select and choose ‘Get emails(V3)’. Set the required parameters:
- Folder: Select the folder from where you want to move the emails.
- Fetch only Unread Messages: Select No from the drop-down.
- Include Attachments: Choose Yes from the drop-down if you want to include attachments.
- Search Query: Provide the below-given filter query to retrieve the last 2 days’ emails.
received<getPastTime(2,'Day')
To automatically move the email to the folder after 30 days using Power Automate, use an expression like received<subtractFromTime(utcNow(),30,’Day’).
Important:
Here, we can only retrieve 25 emails from the Outlook, because there is a known limitation that getting more than 25 emails is impossible since it’s the max value in action.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (4) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (4)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/How-to-automatically-move-emails-to-a-folder-in-outlook.jpg)
3. To move the emails to a different folder, choose and add the Move email(V2) action.
Provide the below details:
- Message-Id: Take ID from get emails of dynamic content.
- Folder: Select a Recent Emails folder from the open folder icon.
Then, For each loop will be added automatically by taking the body/values of the Get emails(V3) flow action.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (5) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (5)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Move-Emails-to-a-Folder-After-Time-using-Power-Automate.jpg)
4. Now, click on save and run the flow manually.
5. Once the flow runs successfully, you can check the Outlook folder [Recent Emails] for the moved emails.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (6) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (6)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-automatically-move-email-to-folder-after-2-days.jpg)
This is how to move emails to a folder after 2 days using Microsoft Power Automate.
Archiving Emails using Power Automate
To add emails to an archive folder in Power Automate, dive into the example below:
Example:
The below image shows the Outlook Archive folder without any emails:
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (7) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (7)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-email-archiving.jpg)
Here, I wanted to move the files that are older than 2 months with the subject filter as Test.
Follow the above simple steps:
1. Inside the Get emails(V3) action, set the required properties to retrieve emails older than 2 months.
- Subject Filter: Enter the subject filter text manually.
- Folder: Choose Inbox folder.
- Search Query: Provide the below search query.
received< @{startOfMonth(subtractFromTime(utcNow(),2,'Month'))}
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (8) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (8)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Add-to-archive-Power-Automate.jpg)
2. Then, in the Move email(V2) flow action, select Message Id as Id from the Outlook of Get emails and Folder as Archive from the open folder icon.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (9) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (9)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Move-email-to-Archive-folder-Power-Automate.jpg)
Save and test the flow.
3. Now, check out the email. Then, the archive folder shows the forwarded email.
Refer to the image below:
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (10) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (10)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Move-email-Power-Automate.jpg)
This is how to add emails to the archive folder in Power Automate.
Move Email to Folder Based on Subject in Power Automate
To filter the emails based on subject and move emails to a folder using Power Automate, follow the example below:
Example:
Here, I have created a new folder named Power Platform in Outlook, as shown in the below figure:
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (11) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (11)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-move-email-to-folder-based-on-subject.jpg)
Now, I wanted to move the emails from the Inbox folder to another folder[Power Platform] using Power Automate based on the subject filter[Power Platform].
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (12) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (12)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Move-email-to-folder-based-on-subject-using-Power-Automate.jpg)
To achieve this, You can check the steps below:
1. In the Get emails(V3) flow action, add the Subject Filter manually.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (13) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (13)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/How-to-move-mails-automatically-to-a-folder-in-outlook-on-subject.jpg)
2. In the Move email(V2) action, take Message Id and select Folder as Power Platform.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (14) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (14)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-when-email-is-moved-to-folder-based-on-subject.jpg)
Output:
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (15) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (15)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-move-email-on-subject.jpg)
This is how to automatically move emails from inbox to another folder based on subject using Power Automate.
Save Emails to SharePoint Library using Power Automate
To move emails to the SharePoint document library in Power Automate, see the below example:
Example:
Here, I wanted to move an email to the SharePoint document library When an email arrives with the subject filter Product Details.
For this, I have created a SharePoint document library to save all the files, as shown below.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (16) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (16)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-Move-emails-to-SharePoint-folder.jpg)
Check out the steps:
1. Create a Power Automate Automated cloud flow with a trigger ‘When a new email arrives (V3)‘.
By default, the Folder is set to Inbox.
Then click on Showall to display Advanced parameters,and you can set theSubject Filter.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (17) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (17)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Auto-move-emails-to-folder-in-outlook-to-SharePoint.jpg)
2. Then, choose “Export email (V2) and select Message ID from the dynamic content into the Message ID field.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (18) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (18)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Get-emails-v3-search-query-Power-Automate.jpg)
3. Next, select the Create File action to save the email in theSharePoint document library.
Enter the details like Site Address and Folder Path.
- File Name: Take Subject from dynamic content with the .eml extension
- File Content: Choose Body from dynamic content of Get email action.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (19) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (19)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-move-email-in-SharePoint-folder.jpg)
Now, the flow is ready -> Click on Save and Test the flow manually.
4. When the flow triggers, send an email from the other user with the subject Product Details as shown below screenshot:
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (20) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (20)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-automatically-move-emails-to-SharePoint.jpg)
5. When the flow runs successfully, you can see that the email has been moved to the SharePoint document library.
![How to Move Email to Folder using Power Automate? - Enjoy SharePoint (21) How to Move Email to Folder using Power Automate? - Enjoy SharePoint (21)](https://i0.wp.com/www.enjoysharepoint.com/wp-content/uploads/2024/05/Power-Automate-save-emails-to-SharePoint-folder.jpg)
This is how you can move emails from Outlook to the SharePoint document library using Power Automate.
Conclusion
This Power Automate tutorial will give you an idea of how to move emails to a folder using Power Automate.
Along with this, I have covered additional topics like:
- Outlook automatically move emails to the folder after 2 days
- Add to archive emails Power Automate
- How to move an email to a folder based on the subject Power Automate
- Power Automate move email to the SharePoint folder
You may also like:
- Add Outlook Calendar Events in Excel Using Power Automate
- Power Automate Send Email On Specific Date
- How to Use Power Automate dayOfWeek Function?
- How to Use Power Automate Get Items Filter Query
Bijay Kumar
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.