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 / OneDrive trigger condi...
Power Automate
Unanswered

OneDrive trigger condition to check if file already exists

(1) ShareShare
ReportReport
Posted on by 69

Hello!

 

Flow Summary: I created a flow that takes excel attachments from specified emails and saves them to a OneDrive folder. There are a mix of .xls and .xlsx files. Next - I need to convert .xls files to .xlsx. The only way I could figure out how to do this, was to open the .xls files and save as .xlsx (might not be the best way to achieve this, but it's working). The workflow then goes back and deletes the original .xls files from the OneDrive folder. Next - I have a Run Script action that creates tables and other things in the .xlsx files.

 

Problem: I'm using the OneDrive (for Business) "When a file is created" trigger, so each time a new excel file is added to the folder the flow runs. This works as expected , except that it runs a 2nd time immediately after it does the Save As when converting the .xls file to .xlsx because technically a new file was created (original file was .xls and new file via Save As is .xlsx). I don't want the flow to run a 2nd time for the recent Save As .xlsx file, it should continue from the original trigger...but not trigger another flow run. I was thinking there must be a trigger condition I can set on the "When a file is created" OneDrive action that will check to see if the filename and file extension were "just/recently" created and not run if within so many minutes.

 

Complexity: The reason this is complex, is that there are times a file is resubmitted (same filename and file extension) and the workflow should run, it's just the new file that gets created within the workflow that I need it to ignore/not run.

 

Resulting Issue: Un-necessary workflow runs and they fail, which will send failure emails

 

Here's the main part of my flow

 

Ckatz_0-1650930155296.pngCkatz_1-1650930182780.png

Ckatz_2-1650930221563.pngCkatz_3-1650930252497.png

 

Categories:

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard