cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rad
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
v-bacao-msft
Community Support
Community Support

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
Brad_Groux
Community Champion
Community Champion

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!

v-bacao-msft
Community Support
Community Support

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

@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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,380)