Skip to main content

Notifications

Power Automate - General Discussion
Answered

How do i Retrieve latest record from SharePoint list for HTTP connector using Power Automate.

(0) ShareShare
ReportReport
Posted on by 392

I have two Power Automate flows.

The first flow is named PA1, and it saves a string variable inside a SharePoint list under a column called Calculated_Result, as shown in the screenshot below.

Jupyter123_0-1679654283299.png

 

In the second flow (PA2), I want to use this SharePoint list by retrieving the most recently added row. However, in the Get Item action, I have specified ID : 1, [See screenshot Below] but I actually want to retrieve the latest record of calculated_Result column from the SharePoint list and not just the first record.

In the HTTP connector action, I have a JSON payload where I want to pass the value of a SharePoint list column called 'calculated_Result'. Also i used power apps action at beginning of flow, its because i want to pass both power apps input + sharepoint list input to my http connector.

Jupyter123_1-1679654467234.png

 

Note:

If I use Get Items instead of Get Item, it goes into an Apply to each loop, and the Parse JSON action is not able to parse the JSON because the HTTP connector is inside the Apply to each loop. Even if I use Parse JSON inside Apply to each, I cannot use the Initialize Variable action inside it, as it shows an error stating that the Initialize Variable action should be used at the topmost level.

 

How can i fix this?

 

  • Jupyter123 Profile Picture
    Jupyter123 392 on at
    Re: How do i Retrieve latest record from SharePoint list for HTTP connector using Power Automate.

    @Sundeep_Malik Hey, thanks for the reply. it works!

  • Verified answer
    Sundeep_Malik Profile Picture
    Sundeep_Malik 6,480 on at
    Re: How do i Retrieve latest record from SharePoint list for HTTP connector using Power Automate.

    Hey @Jupyter123 

     

    Dont use get item, use get items and keep its order by and top count conditions as below:

     

    Sundeep_Malik_0-1679660746589.png

     

    This will order your list in descending order of created date and time so the latest entry in the table. Then top count 1 will take out only 1 value from it.

     

    Then use a compose inside it and add a similar condition as below:

     

    outputs('Get_items')?['body/value']?[0]?['YourFieldYouwanttoretrieve']
     

    Sundeep_Malik_1-1679660831022.png

     

    I hope this helps 🙂

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard