Power Community

Power Community

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

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

Clone Dynamics 365 CRM Sales Order Records along with their Related Invoice Records!

Sales teams using Dynamics 365 CRM have to frequently create new sales orders and invoices based on existing ones....

More Articles Like This

- Advertisement -spot_img