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
Continued Contributor
Continued Contributor

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

View solution in original post

4 REPLIES 4
FoDelement
Continued Contributor
Continued Contributor

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

View solution in original post

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

RezaDorrani
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

v-alzhan-msft
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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (85,603)