cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cchan000
Helper V
Helper V

need help sending an email when a status is changed in my sharepoint form

i have a combo box drop down, when a user changes the status to "Completed" I want an email sent to the requestor. normally this works for me but i am having a problem.

 

Is my code correct? Do I use Status or Status Value?

 

equals(triggerBody()?['Status']?['Value'],'Completed')

 

Screen Shot 2020-08-10 at 7.41.11 PM.png

1 ACCEPTED SOLUTION

Accepted Solutions
UdayAdhikari
Continued Contributor
Continued Contributor

You are welcome @cchan000! Glad to hear that its helping. 

 

So, I see that you are using the wrong trigger, please refer to my previous reply with screen captures. The trigger which is the first SharePoint connection should be "When an item or file is modified". Replace "When an existing item is modified" inn your flow with "When an item or file is modified" in order for "Get changes for an item or a file (properties only)" to work.

 

Keep us posted!

Thanks

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

14 REPLIES 14
UdayAdhikari
Continued Contributor
Continued Contributor

Hello @cchan000 - first, you will have to use "Value" field. Second, if you want to run the flow only when the status is "Completed", you can go to trigger Settings (right 3 dots on trigger name > Settings) and add this expression: 

@equals(triggerBody()?['Status/Value'],'Completed')

 

This will minimize your flow runs (no impact to daily flow run quote and also keeps flow run history clean).

 

Hope this is useful!

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

hi. will this execute as soon as status changes to completed? It did not work.

 

i used the code equals(triggerBody()?['Status/Value'],'Completed')

 

question, i'm not a coder, what does the / between status and value do?

 

Screen Shot 2020-08-11 at 9.58.40 AM.png

UdayAdhikari
Continued Contributor
Continued Contributor

@cchan000 - appreciate including the screen capture; I am sorry I was not clear in my previous reply so sending you screen captures on how and where to set up the condition. Value basically extracts text from the dropdown control. And finally, welcome to Power Platform world, you really don't have to be a coder as you can will experience soon once you knock out few of these. You are at the best place to learn and ask questions, continue doing that.

 

FlowTriggerCondition1.pngFlowTriggerCondition2.png

 

Hope this helps in a resolution.

 

Thanks

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

so close! your screenshots helped a lot.

 

there is one problem. the flow gets triggered anytime anything is changed in the sharepoint form (as long as the status is already completed).

 

i just want an email sent ONLY when the Status combo box changes to "Completed"

 

not any other changes.

UdayAdhikari
Continued Contributor
Continued Contributor

@cchan000 - glad to hear that we are making some progress. Ok, in order to achieve what you are asking (send email only once when status is changed to Completed), try below. Not the trigger and subsequent actions that you need to configure. "When an item or file is modified" is a brand new trigger being rolled out currently. I tested on couple of my tenants and found the new trigger so I feel comfortable sharing with here otherwise you will have to enable preview feature at the environment level.

 

Give this a try and let me know if you have any further questions. Continue to configure the trigger condition as above if you do not want to run the flow if status is not "Completed"

 

FlowTriggerCondition3.png

 

Thanks

Uday

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

i! i did exactly as you specified in the screenshots. so close now. it runs but it errors. i also did a test and did not get a confirmation email, probably because of the error.Screen Shot 2020-08-13 at 1.06.10 PM.png

UdayAdhikari
Continued Contributor
Continued Contributor

@cchan000 - almost there..  looks like versioning is not turned on in your list. Go to the list > List settings > Versioning settings > Item Version History > check Yes and enter a number and click OK. This should work now but let me posted.

 

Uday

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

i really appreciate you holding my hand through this. i feel we are so close now and i'm learning a lot through this.

 

i enabled version history with "100" as the number of versions.

 

ran it again and received this error.

 

Screen Shot 2020-08-13 at 3.33.40 PM.png

UdayAdhikari
Continued Contributor
Continued Contributor

You are welcome @cchan000! Glad to hear that its helping. 

 

So, I see that you are using the wrong trigger, please refer to my previous reply with screen captures. The trigger which is the first SharePoint connection should be "When an item or file is modified". Replace "When an existing item is modified" inn your flow with "When an item or file is modified" in order for "Get changes for an item or a file (properties only)" to work.

 

Keep us posted!

Thanks

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

i'm grinning big. thank you.

UdayAdhikari
Continued Contributor
Continued Contributor

@cchan000 Awesome! Makes me a happy camper 😀. Glad I could help. Happy learning... U

 

 

 

Raou
Frequent Visitor

Hello @UdayAdhikari 

 

Thank you for this guide. I found it useful.

However, I did the same steps and my flow runs successfully but I am not receiving the email as it should be.

Anything I am missing.Email flow 1.PNGemail flow 2.PNG

 

Please advise.

 

Craig_Cowley
Resolver I
Resolver I

Hi @UdayAdhikari ,

 

I've found this really useful and have had it running for a week or so now, so thank you.

 

Would it be possible to add an addition check for the status being changed to 'Rejected', so that you could send an email with different content?

 

Thanks in advance

 

Craig

dsuar076
New Member

Hi! 

 

I'm creating a microsoft flow where once I change the status of my list to completed it sends an email to an email (these emails will be grabbed from the form). The email will contain an image as a message body, 4 attached videos, which is where I'm having trouble. Can anyone help?

 

Things I need help with:

How to have the message body be an image

how to attach the four videos in this automated email.

 

Let me know if you have any tips!

 

 

Screen Shot 2021-09-03 at 11.32.06 AM.png

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,195)