cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Responsive Resident
Responsive Resident

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

View solution in original post

4 REPLIES 4
Highlighted
Responsive Resident
Responsive Resident

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

View solution in original post

Highlighted

@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.

Highlighted
Dual Super User II
Dual Super User II

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

Highlighted
Community Support
Community Support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (10,053)