web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow Overwriting Onedr...
Power Automate
Unanswered

Flow Overwriting Onedrive Folder

(0) ShareShare
ReportReport
Posted on by

I have two flows that are to be pulling attachments from Outlook and saving them to folders in Onedrive each day.

 

Both flows appeared to be working when tested, but now when I go into the respective folders they only contain files uploaded from the previous day, rather than the whole week/month.

 

Each flow is setup the same way to grab emails with certain subject lines, that have attachments ending in certain formats, and then saving them (with timestamp appended to filename to avoid duplicates) in a certain folder in my Onedrive.

 

When I go into the Onedrive history it does show files being put into each folder daily, and there are no files in the recycling bin, so what is happening here? Is it possible that somehow the flow is creating a new folder with the same name and overwriting the old files?

 

Current setup:

When a new email arrives

For Each

Condition True/False

True (ends with .csv)

Save to folder in Onedrive

 

 

 

Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,508 Moderator on at

    @Taylor_work

    It's hard to say what's happening in your flow without seeing it. However, I would recommend that you set up Trigger Conditions for your flow. Without Trigger Conditions, your flow will trigger each time a new email arrives in your inbox. Instead, you can set up Trigger Conditions to only trigger your flow when a new email arrives and has attachments. You can get more specific if it's a CSV file from a specific email address.  

     

    This way, your flow won't trigger unnecessarily. Depending on how you are saving your files you could be overwriting your existing file. You should check your file's version history. Click on the three dots of your file and select Version History. 

     creativeopinion_0-1713404295812.png

     

    If your file has been overwritten, you will see all the versions listed. You can download any prev versions by clicking the three dots and selecting Download.

     creativeopinion_0-1713404565146.png

     

     

    In the meantime, check out this YT Tutorial: Save Email Attachments to SharePoint with Microsoft Power Automate

     

    Although this tutorial covers how to "download" attachments from email to SP—the same concepts can be applied for getting your attachments into OneDrive. Just select the appropriate OneDrive actions.

     

    Power Automate doesn’t have a download attachment from outlook action. In this Power Automate Video tutorial, I’ll show you how to use the Get Attachment (V2) action in combination with the Create File action to get your email attachments onto SharePoint.

     

    The Create File action will overwrite any files that already exist with the same name. In this tutorial, I’ll show you how you can append a timestamp to the end of a file name to prevent your file from being overwritten.

    I’ll also show you how to set up your flow so that you can trigger it manually while building it so you don’t need to wait for an email to arrive. At the end of the video I’ll show you how adding trigger conditions to your flow can prevent it from triggering if certain conditions aren’t met. Although the final flow uses the When a new email arrives in a shared mailbox (V2) trigger, you can use any of the When a new email arrives triggers for your flow. Adjust this flow to suit your needs!

     

    IN THIS VIDEO:

    ✅ How to Automate Downloading and Uploading Email Attachments to SharePoint

    ✅ How to Use a the Get Email (V2) action

    ✅ How to Use the Get Attachment (V2) action

    ✅ How to Create Attachment Files using the Create File Action

    ✅ How to Prevent the Create File Action from Overwriting a File

    ✅ How to use Split the Filename from its Extension

    ✅ How to Append a Timestamp to a File Name

    ✅ How to use the When a New Email Arrives in a Shared Mailbox (V2) trigger

    ✅ How to use the Convert Time Zone action

    ✅ How to add Trigger Conditions to your Flow

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on
    TikTok and Instagram

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard