cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Eric_Cheng
Level: Power Up

Send email with multiple list item link and get items filter with lookup value

I have two questions on microsolt flow.

1. I have a list which has a column status. I want to get all the list item record where status is 'expired' and send only one email which include all the list item link in the email body. For example, The list has 10 records with status expired and I want to send only one email where the email body include all the 10 list item link. I know how to send a email by a record using "apply to each" only but I don't know how to append all the list item link into a single email. Is it possible to do that?

 

2. For the same list in question 1, the column status is a lookup column.  I want to get all the list item record where status is 'expired'  using the action Get Items with the Filter Query "status eq 'expired'". However, it fails to get the records. I think I should filter the status's value instead of status. I would like to know how to filter the lookup value using Filter Query?

(P.S. I don't want to get all the record and use apply to each and condition to filter it as it may cause performance problem when It has large amount of list data).

 

Regards,

Eric

5 REPLIES 5
Highlighted
Community Support Team
Community Support Team

Re: Send email with multiple list item link and get items filter with lookup value

Hi @Eric_Cheng,

 

For your first question, I think it is possible to do that in Micorosft Flow. I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a "Get items" action, specify Site Address and List Name.
  • Add a "Filter array" action, From set to output of "Get items" action, within Condition box, left input box set to Status dynamic content of "Get items" action, right input box set to expired. Within middle drop down, choose is equal to.
  • Add a "Select" action, From set to output of "Filter array" action. Within Map entry, add a entry, key set to Link to item and value set to following formula:
  • item()?['{Link}']
    Add a "Create HTML table" action, From set to output of "Select" action.
  • Add a "Send an email" action, Body set to output of "Create HTML table" action, Is HTML field set to Yes.

Note: The Status column is Single line of text type column within my SharePoint list.

 

Image reference:17.JPG

The flow works successfully as below:18.JPG

 

19.JPG

 

For you second question, using OData query to filter items based on Lookup column of SharePoint list is not supported in Microsoft Flow, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

In condition, you could consider take a try to filter items based on Lookup column of SharePoint list using "Filter array" action. I have made a test on my side and please take a try with the following workaround:20.JPG

The flow works successfully as below:21.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
EricCheng
Level: Powered On

Re: Send email with multiple list item link and get items filter with lookup value

 

Hi Kris,

 

Thank you for your reply. For the first question, I have tried with your solution and it seems work fine but the link send to the email is not hyperlink. (it is hyperlink in your figure) How to change the link into hyperlink?

 Figure1.jpg


Regards,
Eric

Community Support Team
Community Support Team

Re: Send email with multiple list item link and get items filter with lookup value

Hi @EricCheng,

 

Please check if have set Is HTML field to Yes within your "Send an email" aciton, if not, please set Is HTML field set to Yes.29.JPG

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
EricCheng
Level: Powered On

Re: Send email with multiple list item link and get items filter with lookup value

Hi Kris,

 

Sorry for late reply. I have already set the field Is HTML to yes. However, the hyperlink still not exists.

Figure 2.jpga

Figure 3.jpg

 

 

Regards,

Eric

 

Bill_Hand
Level 8

Re: Send email with multiple list item link and get items filter with lookup value

Any chance you were able to get this working?

 

Thanks

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
Users Online
Currently online: 369 members 6,003 guests
Please welcome our newest community members: