Skip to content

Commit 57b7864

Browse files
authored
Update 'Working with the SharePoint Send HTTP Request flow action in Power Automate.'
Performed edit pass per MSTP guidelines. Requires technical review for accuracy.
1 parent 56fc4bc commit 57b7864

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed
Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,59 @@
11
---
2-
title: Working with the SharePoint Send HTTP Request Power Automate action
2+
title: Working with the SharePoint Send HTTP Request flow action in Power Automate
33
ms.date: 03/11/2020
44
---
55

6-
# Working with the SharePoint Send HTTP Request Power Automate action
6+
# Working with the SharePoint Send HTTP Request flow action in Power Automate
77

8-
The SharePoint Send HTTP Request flow action allows you to construct and execute SharePoint REST API queries. This action is particularly useful in the cases when the existing SharePoint flow actions do not suffice the need or just that the action you are looking is not available yet in the SharePoint connector.
8+
The SharePoint Send HTTP Request flow action in Power Automate lets you construct and execute SharePoint REST API queries. This action is particularly useful in cases where the existing SharePoint flow actions do not handle your requirements, or the action you are looking for is not yet available in the SharePoint connector.
99

10-
Below are some of the tips on how to work effectively with the SharePoint Send HTTP Request action.
10+
See the following tips about how to work effectively with the SharePoint Send HTTP Request action.
1111

1212
> [!NOTE]
13-
> This is a developer focused action and hence you will need to understand how SharePoint REST API works and also how to parse JSON strings in Microsoft Flow.
13+
> This is a developer-focused action. You must understand how SharePoint REST API works and also how to parse JSON strings in Power Automate.
1414
1515
## Get to know the SharePoint REST/OData APIs
1616

17-
SharePoint has many APIs. The one we are interested in is the REST/OData APIs. You can find the complete set of REST/OData APIs [here](https://docs.microsoft.com/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service#bk_learnmore).
17+
SharePoint has many APIs. The focus here is the REST/OData APIs. For the complete set of REST/OData APIs, see [Get to know the SharePoint REST service](https://docs.microsoft.com/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service#bk_learnmore).
1818

19-
Though you can use the SharePoint 2010 REST APIs (_vti_bin/listdata.svc) in some cases, it is recommended to use REST/OData APIs instead.
19+
Although, in some cases, you can use the SharePoint 2010 REST APIs *(_vti_bin/listdata.svc)*, we recommend using REST/OData APIs instead.
2020

2121
## Use JSON light
2222

23-
SharePoint REST/OData APIs support [JSON light](https://www.microsoft.com/microsoft-365/blog/2014/08/13/json-light-support-rest-sharepoint-api-released/). This means that you can set headers in your API request that will tell SharePoint whether to include any metadata in the response. In many cases, you will not require the metadata. It just makes things easier to parse the output of the action.
23+
SharePoint REST/OData APIs support [JSON light](https://www.microsoft.com/microsoft-365/blog/2014/08/13/json-light-support-rest-sharepoint-api-released/). This means that you can set headers in your API request that inform SharePoint whether to include any metadata in the response. In many cases, you do not require the metadata. Metadata makes things simpler to parse the output of the action.
2424

2525
To do this, just add the following header:
2626

2727
```http
2828
Accept: application/json; odata=nometadata
2929
```
3030

31-
## Parsing the response
31+
## Parse the response
3232

33-
If you execute a GET request, then you most probably want to parse the response. Good thing is that the default response is JSON and that makes things easier.
33+
If you execute a GET request, you generally want to parse the response. The default response is JSON, making execution simpler.
3434

35-
You can do that by querying the body of the action and then parsing through the JSON array or object depending on your response.
35+
Parse the response by querying the body of the action, and then parsing through the JSON array or object depending on your response.
3636

37-
You can easily build an expression to do that:
37+
To do that, build an expression:
3838

3939
```http
4040
body('Send_an_HTTP_request_to_SharePoint' )['Id']
4141
```
4242

43-
In cases where you have an array, then you have a JSON array object. You can use the above expression but then construct an apply to each action and use the following expression to input the variable to work with.
43+
In cases where you have an array, you have a JSON array object. You can use the previous expression and then construct an apply to each action, and use the following expression to input the variable to work with:
4444

4545
```http
4646
body('Send_an_HTTP_request_to_SharePoint' )['value']
4747
```
4848

49-
Inside the apply to each action, you can then access the individual elements with the following expression:
49+
Inside the apply to each action, you can then access the individual elements with the following expression:
5050

5151
```http
5252
items('Apply_to_each')['Title']
5353
```
5454

55-
## Accessing all dynamic content
55+
## Access all dynamic content
5656

57-
Since the fields in the SharePoint HTTP Request action are text fields, the flow designer filters the default items in the Dynamic Content to be of string properties.
57+
Because the fields in the SharePoint HTTP Request action are text fields, the flow designer filters the default items in the **Dynamic Content** to be of string properties.
5858

59-
To get the non-string properties, all you need to do is click See more for that action in the Dynamic Content and you will see all the non-string properties as well.
60-
61-
This is particularly useful when you want to build queries where you need to pass the ID of an item which is a number and not a string.
59+
To get the non-string properties, select **See more** for that action in the **Dynamic Content**. All the non-string properties appear as well. This is particularly useful when you want to build queries where you need to pass the ID of an item which is a number and not a string.

0 commit comments

Comments
 (0)