Use Power Automate to Automatically Save Email Attachment to Onedrive
This article explains the steps to save an email attachment to OneDrive, by creating an automated Power Automate flow that triggers when a new email arrives, includes a loop to process each attachment, and uses the "Create file" action in OneDrive.
What is Power Automate?
Microsoft cloud-based Power Automate tools connect programs like Teams, OneDrive and Outlook to automate repetitive tasks. Without requiring any coding knowledge, it assists users in creating workflows that operate automatically, saving time and increasing productivity.
Why is this flow useful?
Email attachment from Outlook can be automatically saved to OneDrive using the flow in Power Automate, eliminating the need for human intervention. A Power Automate flow is an automated workflow that connects different apps and services to perform a sequence of tasks, with little to no coding knowledge required. It guarantees that crucial attachments are safely saved and available in the cloud, help keep files organised and save time.
Configurations
Step 1: Sign in to Power Automate
- Open Power Automate from office.com or go to https://flow.microsoft.com.
- Sign in using your Microsoft 365 account.
- On the left navigation panel, Select Create.
Step 2: Create A new flow
- Select Automated cloud flow.
- Enter a name on your flow.
- Under “Choose your flow’s trigger”, Search for When a new mail arrives (V3).
- Select Create.
1. Step 3: Configure the Email Trigger
- In the Trigger settings
- Include attachments: Yes.
- Only with attachments: Yes.
- Folder: inbox (or another folder you prefer).
2. Optionally, Add Filter
- From address: to save only from specific senders.
- Subject filter: to target email with specific keywords.
Step 4: Add the save to OneDrive action
- Select +New step.
- In the search bar type onedrive and choose create file (OneDrive for business).
- Configure the action.
- Folder path: Choose or create your folder.
- File name: Select attachment name from your content.
- File Content: Select attachments content.
Step 5: Test the Flow
- Select save in the upper-right corner of the flow editor.
- Click Test → Manually.
- Send an email with one or more attachments to your mailbox.
- Wait a few moments for the flow to run.
- Open OneDrive in your browser and confirm the files appear in your chosen folder.
