This blog will help to get a list item using an HTTP call in the SharePoint Designer Workflow.

If we want to use App Permission instead of Current User Permission in the SharePoint Designer Workflow, use App Step for the elevated permission.

Search Build and click enter, it will add “Build” action in the Stage.

Create a new Dictionary Variable and name it as “Header” in the “Build” action to store the headers for the HTTP call.

Then, click on “this” in the “Build” action, it will show the dictionary variable, while add in the “Header” dictionary variable, it will show another popup to add the dictionary item in it.

 We have to add Headers for the HTTP call by adding the headers as a dictionary item in the Dictionary. To use the HTTP call, add the below headers.

NameTypeValue
AcceptStringapplication/json;odata=verbose
Content-TypeStringapplication/json;odata=verbose

Create a new variable and enter the List

Note: Search as variable and enter, it will “Set Workflow Variable” action, then click on “Workflow Variable” and create a new variable or choose “Set Workflow Variable” from “Action”.

Create a new variable to form the HTTP rest API to get data from the SharePoint list.

To get current Site URL, choose “Workflow Context” from Data Source and “Current Site URL” from “Field from Source”.

To use the Workflow variable, choose “Workflow variables and Parameters” from Data Source, and choose a respected variable from “Field from Source”.

Once the rest API for HTTP call is stored in a workflow variable, then search “HTTP” and click enter it will show “HTTP Call” action in the stage.

Select the “HTTP Call” action and click “Advanced Properties” from the top navigation bar of the workflow. Once clicked on the “Advanced Properties”, it will show “Call HTTP Web Services Properties” modal.

Choose Workflow Variable which is stored Rest API call for Address, “HTTP GET” for Request Type, Workflow Variable which is stored Headers for Request Headers and create a new variable for Request Content and Response Status Code.

To check the error message of the “HTTP Call”,  Choose “Get an item from a Dictionary” from Action and paste it “error/message/value” for path and choose workflow variable which assigned for ResponseContent and choose a variable to store the output and log the variable.

To get an item value from response, Choose “Get an item from a Dictionary” from Action and paste it “d/results(0)” for path and choose workflow variable which assigned for ResponseContent and choose a variable to store the output.

Note: “d/results(0)” – 0 represents to get the 1st item from the response content.

In the “Transition to Stage”, choose “Go to a Stage” and select “End of Workflow”, then publish the workflow. I hope, you have learned how to get a list item using SharePoint Designer workflow from the blog.