cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simonexcel
Regular Visitor

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 Resolver III
Resolver III

Re: SharePoint List - Latest Item in an HTML Email

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

View solution in original post

4 REPLIES 4
FoDelement Resolver III
Resolver III

Re: SharePoint List - Latest Item in an HTML Email

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

View solution in original post

simonexcel
Regular Visitor

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.

Dual Super User
Dual 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
Community Support

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (2,197)