cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Spawn10
Helper II
Helper II

Question on how to use "When an item us created or modified" trigger

When using the "When an item us created or modified" is it necessary or possible to use a "Get changes for an item or a file (properties only)" action as well? My requirements are...

1. I want to send out an email when an item is created in the list.

2. If there an item is modified, to send another email. 

 

- So I am using the "When an item us created or modified" trigger.

- Should I also use the "Get changes for an item or a file (properties only)" action to detect when a change is made?

 

If I do need to use the "Get changes for an item or a file (properties only)" action, will a "Get item" action be required as well? So would it look something like this? 

 

Capture.PNG

 

6 REPLIES 6
Pstork1
Dual Super User III
Dual Super User III

The Get Changes for an item or a file will only work with the Modified trigger, not with the Created or Modified trigger.  If you think about it there can't be any changes to check against when an item is first created.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks @Pstork1 ,

Great point there. What would be the best way to determine if an item was just modified vs created? I want to send a different email when the item is modified. Would using the created and/or modified dates be a good approach?

ScottShearer
Super User III
Super User III

@Spawn10 

Assuming you have versioning turned on, check the version numbers to determine if an item has been modified or created.  If it isn't version 1.0, then it was modified.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Pstork1
Dual Super User III
Dual Super User III

The one exception to what @ScottShearer said is that if you have major and minor versioning enabled the first version may not be 1.0.  It could be 0.1 if minor versioning is enabled.  So I usually compare the Created and Modified date/time.  If they are within 5 minutes of each other you can assume the item was just created.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

I agree with @Pstork1 however the scenario above uses a get item action indicating that this is for use with a list and not a library.  Lists only allow for major versions.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Pstork1
Dual Super User III
Dual Super User III

The trigger works on both Lists and Libraries, but assuming @ScottShearer is correct, then his approach will work.  My bad.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (62,697)