How to Automatically Save Outlook Emails to OneDrive with Unique Names
Question details
The user wants to automatically archive incoming Outlook emails to OneDrive or OneNote, using the email subject as a unique file name while preserving Outlook-style file previews.

- Product
- Microsoft Outlook
- Device & OS
- not provided
- Scenario
- Automatically backing up and organizing email messages into cloud storage with distinct, descriptive file names.
- Observed behavior
- Microsoft Outlook does not provide a standard built-in feature or rule to automatically archive emails directly to OneDrive/OneNote with generated unique filenames.
Ensure you have an active Microsoft 365 subscription with access to Microsoft Power Automate, Outlook, and OneDrive or OneNote.
Create a Custom Power Automate Flow
Since Outlook lacks this native feature, use Microsoft Power Automate to build a custom workflow that triggers upon email arrival, formats the file name, and saves the message to OneDrive.
Power Automate (formerly Microsoft Flow) allows you to bridge the gap between Outlook and OneDrive. By building a custom flow, you can strip invalid characters from the email subject, append a timestamp to prevent overwriting duplicates, and save the file in a compatible format.
Log in to Microsoft Power Automate using your Microsoft 365 credentials and navigate to the 'My flows' section.
Click 'New flow' and select 'Automated cloud flow'. Name your flow and select the trigger 'When a new email arrives (V3)' under Office 365 Outlook.
Add a new step to 'Initialize variable' for your file name. Use an expression like 'utcNow()' combined with the email's Subject line to guarantee a unique filename and avoid duplicate overwrites.
Click 'New step' and search for 'Create file' under OneDrive for Business. Set the Folder Path, input your uniquely generated variable as the File Name (adding a .eml extension), and set the File Content to the dynamic 'Message' content from the Outlook trigger.
Save the flow and send a test email to your inbox. Check your specified OneDrive folder to verify the email was saved correctly with a unique name.

Manage Documents Easier with WPS Office
While automated email archiving requires Microsoft-specific tools like Power Automate, handling everyday document editing shouldn't be overly complex. WPS Office is a highly compatible, all-in-one suite that simplifies creating and saving files to the cloud.
- 1. Download the Installer: Visit the official WPS website and download the free installer for your operating system.
- 2. Install WPS Office: Run the installer and follow the quick on-screen instructions to set up the software.
- 3. Sign In to Sync: Log in with your account to activate 1GB of free cloud storage for automatic document backups.

Frequently Asked Questions
Can I automatically save Outlook emails to OneDrive without using Power Automate?
No, Microsoft Outlook does not have a native rule or setting to automatically export and save emails directly into OneDrive folders. You must either save them manually or use a third-party tool like Power Automate.
How do I prevent identical email subjects from overwriting files in OneDrive?
When setting up your Power Automate flow, append a unique identifier to the filename parameter. Commonly used identifiers include the current date and time (using the utcNow function) or the unique Message ID.
What file format is best for archiving Outlook emails in OneDrive?
Saving emails as .eml or .msg files is recommended. These formats preserve the email body, metadata (sender, date), and attachments, and they support preview capabilities in most cloud storage platforms.




