09-01-2020 14:18 PM
Use Case:
How to check whether a SharePoint site exists or not by using a flow
Flow Details:
In Power Automate, there is no direct action to check whether a SharePoint site exists or not. So, we need to rely on existing SharePoint actions.
I am using "Get Lists" action from SharePoint connector. I am providing the SharePoint site URL to "Get Lists" action. When this action executes as part of the flow execution, we will run into following scenarios:
A. When the SharePoint site does not exists: In this case, "Get Lists" action, throws 404 exception.
B. When the SharePoint site exists but the flow creator does not have access to the site: In this case, "Get Lists" action, throws 403 exception.
C. When the SharePoint site exists: In this case, "Get Lists" action returns all the lists in the SharePoint site.
In the flow, I placed a Switch action to handle exceptions raised by "Get Lists" action.
For complete details, please watch my YouTube video at https://youtu.be/6oPFlXFczAU
I hope this will be useful for you.
Regards
Krishna Rachakonda
https://www.youtube.com/channel/UCciwZsQIm5q8q03kjjWtgVw
watch?v=6oPFlXFczAU
Great article!!