cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Blamb
New Member

SharePoint list & automated Flow- Email in Lookup field from second list

Hi, 

 

I have an automated flow that sends an email upon creating a new item in the primary SharePoint list. Everything is functional with that email. 

 

However, I want to send a copy of that email to another recipient whose name comes from a lookup in another SharePoint list. Essentially, I first tried to link the lookup to also transpose the column with the email address (from an Office 365 account), but I found that this doesn't work. So I then tried writing the email address in a text field 'TextEmail'], that I can now lookup in the primary Sharepoint list ("List2"). So far so good. 

 

The problem then comes to adding this "Text field" email address into the "To:" field of my "Send an email" flow. In the "Add dynamic content" choices, only fields that are recognized as emails (people or group columns) are available... So I tried to add an expression but it does not seem to work (the flow is successful, however it returns nothing - blank - as a result of the expressions I have tried). I have tried: 

 

triggerBody()?['TextEmail']

triggerBody()?['List2']?['TextEmail']

string(triggerBody()?['TextEmail']

 

I also replaced the email address in the "TextEmail" to add "mailto:" before the email address, same result (blank).

 

Is there something else you could suggest to get this to work? 

 

Thanks for any suggestions you may have! 

 

 

 

3 REPLIES 3
annajhaveri
Community Champion
Community Champion

@Blamb , Is TextEmail a lookup column on your primary list?

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Hi @annajhaveri , thanks for taking the time to read my question. 

 

TextEmail is a lookup column; it gets the information from the secondary list. 

 

 

Blamb
New Member

Well, it turns out I found a way to make it work and solved my own problem. It's a bit convoluted but perhaps it can help someone else in the same predicament. 

 

I created another Person or Group column ("Email"). I created a flow that updates the item (in this test, I used a manual trigger - for a selected item).

 

For a selected item

Get item

Update item

 

In the new Person or Group column "Email Claims", I entered the dynamic content of the TextEmail column: outputs('Get_item')?['body/TextEmail/Value'].

 

This populates the new Email column with the data from the Lookup column, as a functional Person or Group which can now be put into the "To:" field of a "Send an email" flow step. 

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
Top Kudoed Authors
Users online (2,273)