cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kmw1130
Post Patron
Post Patron

Get Site URL

I have a flow that runs on a SharePoint List, when a new item is created on the list, it creates a subsite from a customized site template.  I'm using the Send an HTTP Request (GET) and a HTTP Request (POST), once the site is created I would like go back to the list and update that item with the new URL, that is where I'm stuck.  Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @kmw1130 

 

There are couple of ways you could do this. 

 

So under the Update Item URL text box enter the SharePoint url then a slash '/' along with your URL you mapped under the create step which I believe the Opportunity Id.

 

eg: https://yoursharepoint.com/OpportunityID which is your new subsite.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

10 REPLIES 10
abm
Super User
Super User

Hi @kmw1130 

 

Could you post a screenshot of your flow? From what you described is as follows:

 

1. Trigger is when a new item is created

2. HTTP action step

3. Here you can use the update list item action step and use the id from the trigger and Site URL from step 2.

 

My assumption is all three steps are in one flow.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Yes, that is correct, I have a:

 

When item is created

Initialize variable - Site Title

Initialize variable - SiteURL

HTTP - GET

HTTP - POST

 

I will try adding an Update after my HTTP Post.  For some reason, I have a Parse JSON, I think I saw to do that someplace.  This is what it looks like:

 

kmw1130_0-1632913457285.pngkmw1130_1-1632913507156.png

Do I need this?  Or just do the update item and get the ID?

 

This is the options I get when I do an Update item:

kmw1130_2-1632913669291.png

 

Hi @kmw1130 

 

Not sure why you need a Parse JSON. All you need is Update Item SharePoint action step and pass the Id from the trigger.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
kmw1130
Post Patron
Post Patron

Additionally to my flow to create a site from a template, and getting the Url, I also need to rename the newly created site Notebook to the site name, because it doesn't get renamed with the new site.  Any ideas about doing that also?

Hi @kmw1130

 

Is that your first issue you reported is solved now? Also could you post some screenshot of your flow and the rename details.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

No, I'm still not able to add the newly created site url into my list.  Here is my Flow:

kmw1130_2-1633023411500.pngkmw1130_3-1633023474803.pngkmw1130_4-1633023523908.pngkmw1130_5-1633023677295.png

 

The options for the Update Item URL are HTTP Body.

Hi

 

You have minimised all the details step of your flow. Could you please expand those steps and post a screenshot. Ofcourse you can obfuscate the urls and other security info?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Updated my last post with the expanded screenshots.

Hi @kmw1130 

 

There are couple of ways you could do this. 

 

So under the Update Item URL text box enter the SharePoint url then a slash '/' along with your URL you mapped under the create step which I believe the Opportunity Id.

 

eg: https://yoursharepoint.com/OpportunityID which is your new subsite.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

kmw1130
Post Patron
Post Patron

@abm Thank you so much.  That was simple.  

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,710)