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.
- 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.
- Following Next, we must choose the site address and then select the list.
- 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.
- Execute a GET request and check for any issues.
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.
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.
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.
Thank you..!
Comments
-
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.
-
Send HTTP Request to SharePoint and get Response using Power Automate
can you please share some inputs on API consumption.
-
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?
*This post is locked for comments