cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sherlock
Microsoft
Microsoft

Send Approval Email to different users based on Sharepoint List Column Value

Hi everyone,

 

As the title suggests, I am trying to send an Approval e-mail to different users depending on a specific column value that was filled out by a user in a Sharepoint List. The best way I thought of doing this was using a Switch control on that column category. The idea was I would initialize a variable called "Email" with an OBJECT type (please let me know if it should be another data type) and have a switch control to define the "Email" variable depending on what column value was picked: If Intellectual Property, personA's e-mail would be picked, if Confidentiality, person B's email....all the way to Category 26, where Person Z's email would be populated. After the respective e-mail is set in the EMAIL variable, I wanted to use that variable in the "Assigned To" field in the "Start an Approval" section, but I can't seem to use variables.

 

Please let me know if anyone has a fix for this or if anyone has a better approach satisfying this use case. I'd greatly appreciate any and all responses.

 

 

Flow email error.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Ya, I think so.  I'm pretty sure that's what the "Assigned to" field is looking for.

 

You'll want to adjust your Set Variable to just be the email address (won't need all that extra stuff).

 

Another thing to consider is Compose vs. the Variable.  It's quicker and gives you more flexibility.  I think John Liu has a few posts on that.

 

Keep us posted.

-Ed-

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

4 REPLIES 4
edgonzales
Super User
Super User

@Sherlock 

Hi there!  What is the variable type?  Before I dig in too far, want to make sure that's a string, ya?

 

-Ed-

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

@edgonzales hey! It is an Object...should I have tried it as a String? :S

Ya, I think so.  I'm pretty sure that's what the "Assigned to" field is looking for.

 

You'll want to adjust your Set Variable to just be the email address (won't need all that extra stuff).

 

Another thing to consider is Compose vs. the Variable.  It's quicker and gives you more flexibility.  I think John Liu has a few posts on that.

 

Keep us posted.

-Ed-

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Ed! It works!

 

Thank you!

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 (4,474)