I have an issue creating a new list on a particular SharePoint site. When I run the flow, the API actually successfully creates the list called "Test" on the problematic site as I could see the list there, but the same HTTP request action just keeps on running and trying to create the same list that it has created over and over again, which leads to a JSON message saying "A list, survey, discussion board, or document library with the specified title already exists in this Web site. Please choose another title.\r\nclientRequestId: 2f84732e-7ea8-4d49-91ec-5bbdd98901f3\r\nserviceRequestId: 010ccc9f-c0b2-0000-9612-a1b9904794c4"
Here's a screenshot of the flow:
The output after the HTTP request failed to run after 2 retries occurred.
Body
{
"error": {
"code": 502,
"source": "asia-001.azure-apim.net",
"clientRequestId": "2f84732e-7ea8-4d49-91ec-5bbdd98901f3",
"message": "BadGateway",
"innerError": {
"status": 502,
"message": "A list, survey, discussion board, or document library with the specified title already exists in this Web site. Please choose another title.\r\nclientRequestId: 2f84732e-7ea8-4d49-91ec-5bbdd98901f3\r\nserviceRequestId: 010ccc9f-c0b2-0000-9612-a1b9904794c4",
"source": "https://xxxxx.sharepoint.com/sites/xxxxx/_api/web/lists",
"errors": [
"-2130575342",
"Microsoft.SharePoint.SPException"
]
}
}
}
Header
{ "Pragma": "no-cache", "x-ms-request-id": "010ccc9f-c0b2-0000-9612-a1b9904794c4", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "DENY", "Cache-Control": "no-store, no-cache", "Set-Cookie": "ARRAffinity=07abb3f274a938ebb08283001fd69ce1b96d646206f80f6a9e686683a0b031f8;Path=/;HttpOnly;Secure;Domain=sharepointonline-sea.azconn-sea.p.azurewebsites.net,ARRAffinitySameSite=07abb3f274a938ebb08283001fd69ce1b96d646206f80f6a9e686683a0b031f8;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-sea.azconn-sea.p.azurewebsites.net", "Timing-Allow-Origin": "*", "x-ms-apihub-cached-response": "true", "Date": "Thu, 27 May 2021 16:05:56 GMT", "Content-Length": "675", "Content-Type": "application/json", "Expires": "-1" }
Please note that the same flow works perfectly on a different SharePoint site. Could my company have made some setting changes for the problematic site that led to the problem? Because I was able to run this flow on the problematic page the day before yesterday. Please assist me on this.
You saved my bacon. I've been stuck on the same issue for ages. I figured it was due to some throttling or something, but your workaround has helped me get back on track. Thanks! 🙂
@annajhaveri I have tried using different list names, names that have never been used before and I still get the same Bad Gateway error. The API is able to successfully create a list the first time, but even after creating the list, it just keeps on attempting to create the same list over and over again and never stops, and I do not know why. That is likely the cause of the Gateway Error (trying to create a list where the name is already in use).
My only concern is why does the API keeps on creating the same list in one action and not stop there after it has been successfully created? Moreover, it doesn't happen to other SharePoint sites, just the one I'm working on. In the meantime, I'll just stick with the current workaround and explore the root cause in future. Thank you for your response.
@Darren1994 okay thats weird behavior, but its good that you have alternate solution. With SharePoint Designer -> going to all files and checking if you can find the list there after it is deleted, or use PowerShell to get the lists/test folder to know more why SharePoint is behaving in this manner. I am not whether you tried using different list name or not, if not then can try that.
Thank you for your response. I have set Retry Policy to None, and the action fails immediately upon first attempt, but it did successfully create the list I wanted to create.
Apart from setting Retry Policy to None for the action, I had to set the other action (after the one to create a list) to continue running, even after the previous action failed. My automation flow works fine by doing that, even though that particular action has "failed" after creating the list (still the same Bad Gateway).
Screenshot of my workaround below:
and the flow history looks like this:
Even though the "Create a new list" action fails due to Bad Gateway, it fails AFTER it creates the list that I specified. So functionally it's working, and I can add columns for that list and so on after that.
Also, I do not have any list named "Test". Each time I re-run the flow, I'll delete the "Test" list beforehand.
I'll just have to use this workaround for the time being.
@Darren1994 can you please set the Retry policy to None for Send HTTP Request to SharePoint action and test the flow on problematic site? Also please make sure before running the flow, there is no list named Test on that site.
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional