cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EricC
Level 8

Flow issue with Sharepoint List being modfied

Good Evening,

 

I am using the flow template: When an existing item is modified, complete a custom action.

 

My problem is that the front end is a power app and any time the form is altered, when the condition is met in the flow, an email is fired off every time any part of the form is changed, even if it's not the column I have in the condition.

 

Example:

 

Condition

Column A is equal to Yes

 

If yes

 

Send an email

 

Someone goes into the power app, marks Column A Yes and submits, but then someone else goes in and changes column B and submits, well because Column A is marked yes it's still sending an email each time the form is submitted.

 

Is there a way to limit this to sending 1 email? Otherwise, flow isn't as handy as I thought it was...

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
EricC
Level 8

Re: Flow issue with Sharepoint List being modfied

Thanks for your assistance with this. I went ahead and just put a button on my form to send the email using the office365.sendemail function to take care of this problem.

View solution in original post

11 REPLIES 11
Super User
Super User

Re: Flow issue with Sharepoint List being modfied

Hi @EricC

 

I know this is not the most elegant solution, but to keep simple, you may have to add another column and use it in the condition. For example, you can add another column and name it "Email Sent" with a Yes/No value. In the condition check if Column A is equals Yes and Email Sent equals No, send the email and then set Email Sent to Yes. Then in each subsequent modification to the item, the condition will return false because both Column A and Email Sent will be Yes. This will not the email trigger. Please let me know if that's a viable option.

 

Regards,

Fausto Capellan, Jr


Fausto Capellan, Jr


Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Proud to be a Flownaut!


EricC
Level 8

Re: Flow issue with Sharepoint List being modfied

I see where you're going with it but that's not a viable solution it's more of just a workaround/bandaid. I would prefer to be able to just make whatever changes in this same flow if at all possible.

Super User
Super User

Re: Flow issue with Sharepoint List being modfied

One other way that may work for you I described in this post: 

 

https://veenstra.me.uk/2018/02/21/microsoft-flow-are-you-running-out-of-runs-with-microsoft-flow/

 

Look at option 3.

 

You would only trigger the flow on the creation of the item. Then keep your flow alive within a state machine alike construction with a do-until.

 

This way the second field can be just a variable within the flow rather than an additonal SharePoint  list column

 

 

EricC
Level 8

Re: Flow issue with Sharepoint List being modfied

The problem with that is, this is a new hire checklist/onboarding list.

 

So they have 20 things that need to be completed, upon creation of the list I don't want an email to go out because the list has only been created. The issue with that would be the task is not yet complete and the email is fired off to a team who cannot complete their steps until the task is complete on the new hire checklist, hence my needing the conditional email to be fired off when that specific task is marked yes on the checklist and not before when the list is created.

 

@Pieter_Veenstra

Super User
Super User

Re: Flow issue with Sharepoint List being modfied

I still think that it is possible with my approach. Maybe complicated, but possible.

 

Imagine that you process is as follows:

 

field A set -> status variable set to status1

Field B set to no and field C set to yes -> status variable set to status2

etc

 

This way you set you status in the Flow depending on which bits of the data are completed or not. Or even depending on the values of certain fields.

 

This status can then be used within a state machine to loop until a status compelted has been reached.

 

 

Super User
Super User

Re: Flow issue with Sharepoint List being modfied

HI @EricC

 

I think for your case, @Pieter_Veenstra's approach is the best. Like Pieter said, it may be complicated for you, but the community is here to help and we'd be more than happy to walk you though it.

 

Regards,

Fausto Capellan, Jr


Fausto Capellan, Jr


Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Proud to be a Flownaut!


EricC
Level 8

Re: Flow issue with Sharepoint List being modfied

@faustocapellanj @Pieter_Veenstra

 

Can you walk me thru it as I don't think I am comprehending the logic behind what you're suggesting.

 

here is a snip of my flow:

 

cap1.PNG

Super User
Super User

Re: Flow issue with Sharepoint List being modfied

I woul first replace the trigger with an on creation only.

 

Initiate a variable (string variable called status and set it to "Find Status").

 

Then a do until (check the status variable equals complete)

 

Then a switch using the status variable with the following cases:

* Find Status

* Status 1

* Status 2 ( and which ever other statuses your process may have)

* Completed

 

Then in the Find Status  branch look at your triggering item and decide what the current status should be. So this is where the process logc comes in.

 

Then at the end of each  branch chnage the status variable to Find Status again so that the status machine  collects the current status of the flow.

 

You migth want to build in somethign that waits fro 5 minutes or so just so that you avoid spinning around to fast in the Flow.

EricC
Level 8

Re: Flow issue with Sharepoint List being modfied

@Pieter_VeenstraIt's fair to say this is definitely above my experience level! Here is what I have so far:

 

cap2.PNG

Super User
Super User

Re: Flow issue with Sharepoint List being modfied

It does take indeed a bit of time to get used to. This is where Flow development comes in 3 categories.

 

1. small Flows - No real need to organise them well. 

2. medium Flows - You could consider organising the flow as described.

3. large flows - you will get lost in  the flow if you don't organise the flow.

 

 

 

Highlighted
EricC
Level 8

Re: Flow issue with Sharepoint List being modfied

Thanks for your assistance with this. I went ahead and just put a button on my form to send the email using the office365.sendemail function to take care of this problem.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,228)