How to Check if SharePoint List Already Exists in Power Automate?

While working on a Create List with Different Types of Columns flow in Power Automate, I encountered a situation where I needed to check if a SharePoint list with a specific display name already existed. If the list doesn’t exist, the flow should create one. But if it already exists, the flow should send a notification instead of trying to create it again.

In this tutorial, I will show you how to check if SharePoint list already exists in Power Automate. We will use the Power Automate Send an HTTP request to SharePoint action to verify the list’s existence.

Check if SharePoint List Already Exists in Power Automate

Before creating the flow, ensure you have a SharePoint list. I created a SharePoint list (Task Tracker).

Check if SharePoint List Already Exists in Power Automate

Now follow the below steps:

1. Create a new Instant Cloud Flow and choose Manually trigger a flow as the trigger. Then, expand the trigger action and add a Text input field where users can enter the SharePoint List Name.

Power Automate Check if SharePoint List Already Exists

2. Then add a Send an HTTP request to SharePoint action from sharePoint Connector with the below parameter:

  • Site Address: Select the SharePoint Site Address
  • Method: Select “GET” as the method
  • URI: Provide the below URI:
_api/web/lists/GetByTitle('@{triggerBody()?['text']}')
  • Header: Use the below headers to make REST API calls to SharePoint:
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose"
}
power automate check if item already exists in sharepoint list

Now, click Save and run the flow manually. It will ask for the list name—provide the list name (in my case, ‘Task Tracker’), then click Run Flow. After the flow runs successfully, click on the ‘Send an HTTP Request to SharePoint’ action, copy the body part, and paste it somewhere safe as required in the following steps.

How to check if an item already exists in a SharePoint list in Power Automate

3. Add Parse JSON action from the Data Operation connector. Then, in the Content field of the Parse JSON action, select the Body of the Send an HTTP Request to SharePoint action from Dynamic Content.

Click Use sample payload to generate schema for the JSON data. Paste the copied Body content into the Generate from sample window and click Done. The generated schema will look something like this:

power automate create sharepoint list if not exists

4. Add the condition action and set the values such as:

@{body('Parse_JSON')?['d']?['Title']}  Is equal to @{triggerBody()?['text']}
power automate check if sharepoint list  exists

5. In this true section add a Compose action in the value provide the below expression:

List Present.

 In the false section add a Compose action then in the value provide the below expression:

List Not Present.
How to check if an SharePoint list exists In Power Automate

Now, click Save and run the flow manually. It will ask for the list name, provide it (in my case, ‘Task Tracker’), then click Run Flow after the flow runs successfully. You can see the true section compose action run, which means the list is present.

Check if a list exists in SharePoint using Power Automate

However, the problem arises when you give any list name that does not exist on the SharePoint site. In that case, send an HTTP request to SharePoint action field like below:

How to Check if an liat Exists in a SharePoint using Power Automate

So to fix this follow the below steps:

Edit the existing flow, then click on the ‘Parse JSON’ action. Next, go to the Settings tab, and under the Runs After section, expand ‘Send an HTTP Request to SharePoint.’ Check the ‘Has Failed’ checkbox, as shown in the screenshot below:

Check if sharepoint list already exists  power automate

Do the same thing in the condition action like the below screenshot:

Check if list Exists in SharePoint using Power Automate

Now, click Save and run the flow manually. It will ask for the list name, provide any name that does not exist on the SharePoint site, then click Run Flow after the flow runs successfully. You can see the false condition will run successfully.

Check if SharePoint List Already Exists using Power Automate

Conclusion

In this tutorial, we learned how to check if a SharePoint list already exists in Power Automate using the Send an HTTP Request to SharePoint action.

You may also like:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App