Skip to main content

Notifications

Send HTTP Request to SharePoint and get Response using Power Automate

In this post, we’ll work with a SharePoint List using The SharePoint Send HTTP Request action in Power Automate

we will see the most used methods, such as GET, POST, PATCH, and DELETE.

To access SharePoint resources using REST, construct a RESTful HTTP request by using the OData standard.

Method – Get

URL – https://{site_url}/_api/lists/getbytitle('{list_name}')/items

Accept – "application/json;odata=verbose"

 

  • Log in to the flow portal with your Office 365 credentials.
  • For this article, I have created a SharePoint List. Please find its schema below.

Rahman1005_1-1707380582694.png

 

  • Go to https://make.powerapps.com/, then click on "New Flow," choose "Automated cloud flow," provide a flow name, and select "when an item is created." Please consult the screenshot below for reference.

Rahman1005_2-1707380582696.png

 

 

Rahman1005_3-1707380582701.png

 

 

  • Following Next, we must choose the site address and then select the list.

Rahman1005_4-1707380582702.png

 

  • Click on New Step and choose an operation pane, search for "Send an HTTP Request" under actions and select it.

In this window, please select the options as shown below.

  • Site Address: Choose your SharePoint Site.
  • Method: GET
  • Uri: _api/web/lists/getbytitle('List Name')/items.
  • Headers: As per business requirements.
  • Body: JSON body as per business requirements.

 

Rahman1005_5-1707380582703.png

 

  • Execute a GET request and check for any issues.

Rahman1005_6-1707380582705.png

 

 

Once GET request is executed, we need to do parse the response.

Take the result from preview step and generated JSON schema in Parse JSON.

Rahman1005_7-1707380582706.png

 

 

The response body, which is in JSON format, we need to use apply to each action get a result from the previous step, and then we use Compose Action to get a specific result.

 

Rahman1005_8-1707380582707.png

 

 

When we trigger the flow and see the result. Flow will get each item and display the Full Name, Email, and Employee Id as shown below.

 

Rahman1005_9-1707380582709.png

 

 

Rahman1005_10-1707380582710.png

 

 

Thank you..!

Comments

*This post is locked for comments

  • MihirL Profile Picture MihirL 8
    Posted at
    Send HTTP Request to SharePoint and get Response using Power Automate

    The execution of template action 'Apply_to_each_5' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON_3')?['body']?['d']?['results']' is of type 'Null'. The result must be a valid array.

  • ashu19061987 Profile Picture ashu19061987 1
    Posted at
    Send HTTP Request to SharePoint and get Response using Power Automate

    can you please share some inputs on API consumption.

  • khalid4 Profile Picture khalid4
    Posted at
    Send HTTP Request to SharePoint and get Response using Power Automate

    Hey 

    I want to schedule my workflow but i can't see this option in my powerautomate. 
    Does anyone have this ? Do i have a wrong license? 

    khalid4_0-1707752674476.png