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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate Send an...
Power Automate
Unanswered

Power Automate Send an HTTP Request to SharePoint and Send Outlook Mail

(0) ShareShare
ReportReport
Posted on by 29

Good afternoon.

Greetings.

I'm currently building a workflow in Power Automate. Where it starts when you create an item in a SharePoint list:

An approval process then begins in which the element can be modified:

Captura de pantalla 2023-10-17 122327.png

 

With the Power Automate element "Get changes for an item or file (properties only)" I check in the workflow if the information contained in the list record fields has changed:

 

Captura de pantalla 2023-10-17 140859.png

 

With the element "Send an HTTP request to SharePoint" I make a query with the parameter _api/web/lists/GetByTitle('list')/items('id')/versions?$filter=VersionLabel eq '2.0'.

 

Captura de pantalla 2023-10-17 122705.png

 

And with the "Send mail V2" option an email is sent:

 

Captura de pantalla 2023-10-17 141114.png

 

In this process I have 2 main doubts:

  1. In the "Send an HTTP request to SharePoint" option, how could I grab the latest version of the list item from SharePoint? I'm using _api/web/lists/GetByTitle('list')/items('id')/versions?$filter=VersionLabel eq '2.0', but it only takes the second version of the list item.
  2. I have not found which parameters to use in the "Send mail V2" option that reference the latest version of the list item referenced by the "Send an HTTP request to SharePoint" option.

 

I hope you can help me.

 

Thank you so much.

 

Cordially,

Jairo Baleta.

Categories:
I have the same question (0)
  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Why do you need to send an HTTP request? 

     

    If you want the most recent version, remove the version endpoint from the http request. An http request for an item automatically gets the most recent version.

    _api/web/lists/GetByTitle('{list title}')/items({id}) = most recent version

     

    I don't understand why you need an HTTP request, what information or data are you retrieving?

  • jairob Profile Picture
    29 on at

    It is to get the latest version information of the SharePoint list item. Because with the option "Get changes for an item or file (properties only)" it is only informing me if a column changed. When referencing a column of the element it shows me the information it had in version 1.0.

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Use the action Get Item which will get the most current item information.

     

    If you have a flow:

    • Trigger - When Item Is Created
    • Start Approval
    • Update Item
    • Delay 4 Hours
    • Get Item
    • Send Email

     

    If you use the data from Get Item for the email, it will be the most current data.

  • jairob Profile Picture
    29 on at

    Setting _api/web/lists/GetByTitle('{list title}')/items({id}) = '2.0' gave an error:

    The expression "web/lists/GetByTitle('Events')/items(17)='2.0'" is not valid.
    clientRequestId: f6dc2e71-c0c0-4abd-9347-136290235650
    serviceRequestId: 091be5a0-b0e7-4000-706a-a78ba24f7f6e

  • Verified answer
    wskinnermctc Profile Picture
    6,519 Moderator on at

    I apologize @jairob we might have a language translation difficulty.

     

    This is the http request to get the most recent version of the item

    _api/web/lists/GetByTitle('{list title}')/items({id})

     

    This will be the same as using Get Item

    Get Item will be the same as sending an HTTP requestGet Item will be the same as sending an HTTP request

     

  • jairob Profile Picture
    29 on at

    With the Get Item option, how could I bring the same item that I took with the "When an item is created" option and reference the latest version?

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Put the ID from "When an item is created" into the Get Item.

     

    Get Item will be the latest version. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard