cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alison1
Helper III
Helper III

Trigger an email to user when their name is selected in sharepoint list item

Hi all

 

I have a Sharepoint list with a Person or Group type column which allows a user selection from Active Directory, when a user is selected, I would like an email to be sent to that user advising them that a list item has been assigned to them.  Please can I get some help with this?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Alison1,

 

I would use a Get changes for an item or file action for this. With this action you can check if your person or group type column has a changed value. You can check if that is true in a condition. If Yes, you can sent an email.

 

Below is an example of that approach.

In this example my Person or Group type column is called AssignedTo btw. This sample also assumes you are only allowed to select one person in that person column.

 

hascolumnchanged.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

12 REPLIES 12
Expiscornovus
Super User
Super User

Hi @Alison1,

 

I would use a Get changes for an item or file action for this. With this action you can check if your person or group type column has a changed value. You can check if that is true in a condition. If Yes, you can sent an email.

 

Below is an example of that approach.

In this example my Person or Group type column is called AssignedTo btw. This sample also assumes you are only allowed to select one person in that person column.

 

hascolumnchanged.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Alison1
Helper III
Helper III

Hi @Expiscornovus 

Thank you for taking the time to reply, I appreciate your help.  I'm just working through this and am wondering which expression this is?

Alison1_0-1664941730840.png

 

Expiscornovus
Super User
Super User

Hi @Alison1,

 

Apologies, I forgot to share that expression in my reply.

 

I know it is not very clear, but it is actually in the notes of the action directly above the Site Address field in the screenshot.

 

Here it is as a code snippet:

 

add(int(triggerOutputs()?['body/{VersionNumber}']),-1)

 

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hi @Expiscornovus 

 

Thank you for your reply.  I tried again with the code. The flow runs, but unfortunately the email doesn't come through 😞

 

The only thing that looks that there could be an issue is this:

 

Alison1_0-1665037621603.png

and the expression result of the Condition is false, not sure if that means anything.

 

I'm probably doing something wrong as I'm very new to flow.  My column is called Owner

 

Thanks

Expiscornovus
Super User
Super User

Hi @Alison1,

 

It looks like the flow thinks the value in the Owner column has not changed since the last version.

 

Lets double check the outputs. Can you expand the Get changes for a file or item action in that same flow history run and share the outputs as a screenshot?



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hi @Expiscornovus 

 

Please see screenshots as follows:

 

Alison1_0-1665277986482.pngAlison1_1-1665278015379.png

Alison1_2-1665278057356.png

 

Thank you!

 

Grant_Jenkins
Helper I
Helper I

Hi Alison - just been reading through the thread. It looks like it should work. Just to confirm, you need to check your Owner field has changed against the expression true, not just the value true. Are you able to share a screenshot of the condition?

Hi @Grant_Jenkins 

 

Thanks for your help.

Alison1_1-1665294827849.png

 

Alison1_3-1665294991443.png

 

Grant_Jenkins
Helper I
Helper I

It looks like you've added the wrong dynamic field in your Condition. You need to use the Has Content Changed: Owner instead of the Owner/Email from the Trigger.

 

Grant_Jenkins_0-1665295331041.png

 

Yes it worked, thank you so much @Expiscornovus @Grant_Jenkins 🙂

Alison1
Helper III
Helper III

Hi @Expiscornovus @Grant_Jenkins 

 

So the above solution works when I add an owner in the sharepoint list, but not when I add it through my powerapp.  I checked the list in sharepoint which did reflect the changes in the Owner column made in the PowerApp. Do you know what would cause this?

 

This is the result I get when assigning directly in Sharepoint

Alison1_0-1665385570440.png

And this is what I get when assigning in the PowerApp

Alison1_1-1665385618654.png

Thanks

Alison1
Helper III
Helper III

@Expiscornovus @Grant_Jenkins 

Forget my previous post, I tried again from the PowerApp this morning and it worked 🙂

Thanks for you help 🙂

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,548)