🚀 Effortless Power Automate Email Export in 5 Steps

If you want a simple way to store flagged emails as files for future reference, you’ll love this guide. With Power Automate Email Export in 5 Steps, you can automatically export flagged emails, avoid duplicate files, and safely save them in your storage.


🌟 What You’ll Achieve

By following Power Automate Email Export in 5 Steps, you’ll be able to:

  • Export flagged emails directly as .eml files
  • Prevent duplicate file creation with a metadata check
  • Build a reliable and automated backup system
  • Save emails into SharePoint, OneDrive, or your preferred storage

🧰 Prerequisites

To implement Power Automate Email Export in 5 Steps, you need:

  • Access to Microsoft 365 with Power Automate
  • An email account (Outlook/Exchange Online)
  • A SharePoint or OneDrive document library to store the exported emails

🧱 Step-by-Step: Create the Flow

🔹 Step 1: Trigger on Flagged Emails

  1. Go to make.powerautomate.com.
  2. Create a new flow with trigger: When an email is flagged (V3).
  3. This ensures your flow only runs when you flag an email.
Power automate When an email is flagged (V3) action

🔹 Step 2: Compose the File Name

  1. Add action: Compose.
  2. In the Inputs field, click the flash icon and select Subject from the dynamic content list.
  3. Then type .eml after it. This will save the email subject as the file name with an .eml extension.
Power automate Compose action

🔹 Step 3: Export the Email

  1. Add action: Export email (V2).
  2. In the Message Id field, select Message Id from the dynamic content list by clicking on the flash icon.
  3. This generates the raw .eml content of your flagged email.
Power automate Export email (V2) action

🔹 Step 4: Check for Existing File

  1. Add action: Get file metadata using path.
  2. In the Site Address field, select the SharePoint site where you want to save the email file.
  3. In the File Path field, click the folder icon and select any file. This will insert both the file path and file name into the field. Once the path appears, remove the file name and replace it with the “Outputs” dynamic content from the Compose action.
Power automate Get file metadata using path action

  1. Now, add a Condition
    • In the first field, copy the below expression:
      @{outputs('Get_file_metadata_using_path')?['statusCode']}
    • In the dropdown, select: is equal to
    • In the second field, type: 404
      • The status code 404 indicates that the file does not exist. This prevents duplicate exports.
Power automate condition action

🔹 Step 5: Create the File

  1. Inside the True branch of the condition:
    • Add action: Create file.
      • In Site Address: Select the SharePoint site.
      • In Folder Path: Choose your document library and folder path by clicking on the folder icon.
      • In File Name: Select the Outputs of the Compose action by clicking on the flash icon.
      • In File Content: Select the Body from the Export email (V2) action by clicking on the flash icon.
Power Automate Email Export in 5 Steps

Now your flow automatically saves each flagged email as an .eml file only once.


🎯 Result

After completing Power Automate Email Export in 5 Steps, every flagged email gets exported as an .eml file into your chosen storage-without duplicates.


📈 Bonus Tips

  • 📝 Use dynamic folder paths to organize emails by sender or date.
  • ⚡ Add parallel branches to also log details into an Excel file for tracking.
  • 🔒 Combine this with retention policies to build a compliance-friendly archive.

🏁 Wrapping Up

With Power Automate Email Export in 5 Steps, you now have a secure, automated way to back up flagged emails. This method ensures that your important emails are always saved, duplicates are avoided, and everything is just a click away.


💡 Bonus Resources

Leave a Comment