cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Can't determine created vs modified?

Hi all,

 

I am using a flow to post a message to a Teams channel when a file is created, and the same thing if a file is modified. However, I want to be able to differentiate between the two. For example:

 

If a file is created:

A file has been created by [Name]: [FileName.ext]

 

If a file is modified:

[FileName.ext] has been modified by [Name].

 

This is my flow right now:

 

Capture.PNG

 

And it is not working. I am getting "[FileName.ext] has been modified by [Name]." every time, even if the file was created. Any ideas why this is not working?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Can't determine created vs modified?

Hi @rad ,

 

The logic of your Flow configuration is no problem.

I did a test on my side. If you create a file directly in SharePoint, since O365 has an AutoSave mechanism, after you create the file, Flow will consider this to be the changed file.

You could try to upload the file so that the judgment result is true.

57.PNG

 

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

3 REPLIES 3
Highlighted
Super User
Super User

Re: Can't determine created vs modified?

You could use parallel conditions, one for the Created and one for the Modified. You can compare those times to be greater than or equal to the utcNow() expression, like so:

ParallelConditionsCreatedModified.PNG

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Community Support
Community Support

Re: Can't determine created vs modified?

Hi @rad ,

 

The logic of your Flow configuration is no problem.

I did a test on my side. If you create a file directly in SharePoint, since O365 has an AutoSave mechanism, after you create the file, Flow will consider this to be the changed file.

You could try to upload the file so that the judgment result is true.

57.PNG

 

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

Highlighted
Regular Visitor

Re: Can't determine created vs modified?

@v-bacao-msft 

 

Looks like that worked, thank you. Creating and modifying a file in SharePoint directly gives me the result I want, but if I do it from Teams (ex. go into my team's "Files" page and upload something) I do not get the results I want, not sure if there is a way to correct that...

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (10,359)