web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get the latest ...
Power Automate
Unanswered

How to get the latest entry in a Sharepoint list?

(0) ShareShare
ReportReport
Posted on by 1,097

I want to build a flow that export the latest row from a a sharepoint list.

 

If i run the flow right after i added a new row to a sharepoint list, i want to get that specific row in my flow.

If i then make another row in my list, that one is the latest and should be extracted with flow.

 

How to do this?

 

I have set a compose action with this formula

body('Get_items')?['value']?[sub(length(body('Get_items')?['value']),1)]?['ID']

 

but that just extract the same row over and over from my list.

 

Dont get it.

Categories:
I have the same question (0)
  • RobElliott Profile Picture
    10,397 Super User 2026 Season 1 on at

    Hi @Oskarkuus, the simplest way to do what you want is to have a SharePoint "When an item is created" trigger, then the first action should be a SharePoint "Get item" and you can follow that with whatever the next actions should be as shown in my example below. This will only fire whenever a new item is added to the list, in other words the latest item.

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

    whenItemCreated.png

  • Oskarkuus Profile Picture
    1,097 on at

    Yeah but i dont want to get the latest item all the time. I have maybe 20-50 items being created each day.

    I just want the last item created at a specific time.

     

    So i cant use the connector "when an item is created"
    Id like a connector that do: "get the last item being created in this list when this flow runs"

  • RobElliott Profile Picture
    10,397 Super User 2026 Season 1 on at

    Then you need to manually trigger the flow, use a Get items to bring back the whole list. Then in the advanced options of the Get items set order by to ID desc and set the top count to bring back just 1 item. Due to the get items action the subsequent actions will wrap themselves in an Apply to each but it will only apply to the 1 item returned. You can then run the flow whenever you want from the My flows list.

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

    MostRecentItemInSPList.png

  • ArjunRajeev52 Profile Picture
    4 on at

    last(outputs('Get_items_from__list')?['body/value'])['ID']

  • duncant Profile Picture
    278 on at

    @ArjunRajeev52 How did you use this in your flow?

  • dexiu_zhao Profile Picture
    4 on at

    Useful, thanks a lot!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 86 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 55

#3
Ellis Karim Profile Picture

Ellis Karim 53 Super User 2026 Season 1

Last 30 days Overall leaderboard