cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How can I set a trigger to copy a specific file, for instance an excel file, only when it is modified?

The copy operation needs to happen between 2 separate sharepoint accounts. The issue is having the file to trigger in a particular directory, where many other files are present. 'When the file is created or modified' option checks for each file in the folder and that should not trigger a copy of the excel file. Only when the excel is modified, the flow should execute. Is there a way I can achieve this? Sorry, new to this. Thanks in advance.

2 ACCEPTED SOLUTIONS

Accepted Solutions
efialttes
Super User III
Super User III

Hi!

You can add a condition, i.e. if 'Modified' equals to 'Created' this means flow was triggered due to item creation. If 'Modified' is not equal to 'Created' this means flow was triggered due to item modification.

The Condition can be inserted as an action block just after the trigger, then you can add a 'Terminate' action block on the 'item created' corresponding branch

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

One method is to use Control-condition to check if the file is the expected one, if yes, run the following action.

Spoiler
1.PNG

Another method is to use trigger conditions to set Flow to trigger only when certain conditions are met.

Spoiler
2.PNG

You can judge whether Created and Modified are equal. If they are not equal, it means the file has been changed.

In addition, you can judge whether the file name ends with .xlsx. If it is, the file is an excel file.

 

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
efialttes
Super User III
Super User III

Hi!

You can add a condition, i.e. if 'Modified' equals to 'Created' this means flow was triggered due to item creation. If 'Modified' is not equal to 'Created' this means flow was triggered due to item modification.

The Condition can be inserted as an action block just after the trigger, then you can add a 'Terminate' action block on the 'item created' corresponding branch

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

v-bacao-msft
Community Support
Community Support

 

Hi @Anonymous ,

 

One method is to use Control-condition to check if the file is the expected one, if yes, run the following action.

Spoiler
1.PNG

Another method is to use trigger conditions to set Flow to trigger only when certain conditions are met.

Spoiler
2.PNG

You can judge whether Created and Modified are equal. If they are not equal, it means the file has been changed.

In addition, you can judge whether the file name ends with .xlsx. If it is, the file is an excel file.

 

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (91,010)