web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : SzyyChU/S8Wcf0RTYIjVB4
Power Automate - Building Flows
Answered

How do I check if a Document Set already exists in a SharePoint library?

Like (0) ShareShare
ReportReport
Posted on 24 Jan 2024 19:59:43 by 297

I am trying to check if a Document Set already exists within my document library. In my Flow, I have a "Send an HTTP request to SharePoint, that is configured as...

 

Site Address: Site address to where my Doc library is

Method: Get

Uri: _api/web/GetFolderByServerRelativePath(decodedUrl='/DocumentLibrary/User')/Exists

Headers: Accept | application/json;odata=verbose

               Content-Type | application/json;odata=verbose

 

 

I keep getting the error:

"Server relative urls mut start with SPWeb.ServerRelativeUrl\r\n

 

Am I using the wrong api call? How do I get to check if a Document Set already exists?

I have the same question (0)
  • Verified answer
    Spawn10 Profile Picture
    297 on 25 Jan 2024 at 00:57:59
    Re: How do I check if a Document Set already exists in a SharePoint library?

    Found my snag. The property I passed to the api had a leading slash, once I took that out my call worked.

    incorrect: Uri: _api/web/GetFolderByServerRelativePath(decodedUrl='/DocumentLibrary/User')/Exists

    correct: Uri: _api/web/GetFolderByServerRelativePath(decodedUrl='DocumentLibrary/User')/Exists

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard
Loading complete