Jul 12 2022 09:19 AM
Hello,
New to power workflow. I am trying to make it easy to set up a new user starting at HR send an email to the manager to add a user profile, and after the manager adds their info send an email to IT to create an account for the new user. Once IT has finished creating the account an email is sent back to HR and the manager that the new employee's account is ready.
I have the flow but having issues with too many repeated emails. Here is my flow
This part is when HR adds the first and last name and yes to complete an email is sent over to the manager.
My problem is after the yes that triggers an email to the manager that goes through without a problem. The second condition is when the manager completes their part an email is sent to the IT department, but an email is sent to the HR and the Manger, and then the email is resent to the IT department. which this should not be. How can I just have an email sent to Manager and then the IT department and not resend the past emails again?
Jul 12 2022 01:07 PM - edited Jul 12 2022 01:11 PM
@mlott1785 you're getting multiple email because the flow triggers every time the SharePoint item is modified, which column that might be. Make sure you turn on versioning in your list settings. Then your trigger should be when an item or a file is modified. Then you have the get changes action but instead of Trigger Window in the Since and Until fields use an expression of
sub(int(triggerOutputs()?['body/{VersionNumber}']),1)
in the Since field only. That will check the current version of the item against the previous version. Then have a condition of Has column changed: xyz. If it has then do an action. If it hasn't then do nothing or do another action.
That way you can prevent your flow triggering every time the list item is modified and only have it trigger when the column you want is modified.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Jul 12 2022 04:55 PM
I appreciate the info, Being new how do I add the sub(int(triggerOutputs()?['body/{VersionNumber}']),1) line?
Jul 13 2022 12:58 AM
@mlott1785 click in the field and the dynamic content box will open click the Expression tab and paste it into the box.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Jul 13 2022 08:03 AM
Jul 13 2022 10:40 AM
Jul 13 2022 02:21 PM
When I run the flow in the test I get the flow failed
But when I run it a second time it is okay.
Jul 27 2022 04:57 PM - edited Jul 27 2022 05:00 PM
I meant to say the error does not show when I run it again. When my second condition is completed I still receive the first Email and the second.
Here is my second condition.
The manager finished and the condition was only yes. Send an email to the administrator.