How to Move Email to Folder using Power Automate? - Enjoy SharePoint (2024)

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)

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)

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)

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)

3. To move the emails to a different folder, choose and add the Move email(V2) action.

See also Power BI Bar Chart Rounded Corners

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)

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)

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)

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)

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)

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)

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:

See also How to Delete all rows from a SharePoint Online list using Power Automate

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)

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)

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)

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)

Output:

How to Move Email to Folder using Power Automate? - Enjoy SharePoint (15)

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)

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)

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)

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)

Now, the flow is ready -> Click on Save and Test the flow manually.

See also How to calculate sum of gallery items in Power Apps?

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)

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)

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

How to Move Email to Folder using Power Automate? - Enjoy SharePoint (22)

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.

How to Move Email to Folder using Power Automate? - Enjoy SharePoint (2024)
Top Articles
Latest Posts
Article information

Author: Rueben Jacobs

Last Updated:

Views: 6094

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Rueben Jacobs

Birthday: 1999-03-14

Address: 951 Caterina Walk, Schambergerside, CA 67667-0896

Phone: +6881806848632

Job: Internal Education Planner

Hobby: Candle making, Cabaret, Poi, Gambling, Rock climbing, Wood carving, Computer programming

Introduction: My name is Rueben Jacobs, I am a cooperative, beautiful, kind, comfortable, glamorous, open, magnificent person who loves writing and wants to share my knowledge and understanding with you.