cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simonexcel
Level: Powered On

SharePoint List - Latest Item in an HTML Email

I am trying to create a flow that will email the latest addition to a list in SharePoint Online.

I can use the built-in flow to send an email but it's formatted terribly and is hard to read. Is it possible to format the email as HTML but still include only the new addition to the list? I have tried using the 'Select' action and then converting it to an HTML table which works fine, however, it includes all items in the list. I only need the newly added item.

 

This is a screenshot of my flow: https://snipboard.io/HswEPJ.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
FoDelement
Level 8

Re: SharePoint List - Latest Item in an HTML Email

@simonexcel  You want to use the Get Item action, not the Get Items action.

4 REPLIES 4
FoDelement
Level 8

Re: SharePoint List - Latest Item in an HTML Email

@simonexcel  You want to use the Get Item action, not the Get Items action.

simonexcel
Level: Powered On

Re: SharePoint List - Latest Item in an HTML Email

@FoDelement Thanks for your reply. However, if I use Get Item, I have to specify and ID which I don't know because it's a new item. Also, I can no longer create an HTML table using the output from Get Item.

Super User
Super User

Re: SharePoint List - Latest Item in an HTML Email

Hi @simonexcel 

 

Replace select with filter

Capture.PNG

 
When your using getitems specify order
if latest item is first based on your order then use expression
first(body('Get_items')?['value'])?['ID'] 
if latest item is last based on your order then use expression
last(body('Get_items')?['value'])?['ID'] 
 
After filter action, do the same steps with html and send email
 
Another (better) option
When doing getitems query
Order By - to fetch your records based on latest created or modified
there is an property called top count - set it to 1 - so it will return only 1 item based on your order clause
Then use your code with select and html as is
 
 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Community Support Team
Community Support Team

Re: SharePoint List - Latest Item in an HTML Email

Hi @simonexcel ,

 

Please refer to screenshot below to add the Filter Array in the "Get items" action:

1.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 186 members 5,382 guests
Please welcome our newest community members: