HI Deepak great video. Found a bug in the first part of extracting the site script . At least when i tried to extract. The default documents library comes back as Documents which is the display name but not the URL name. It needs to be Shared Documents. I see you changed it to Department documents in the video. When I change the parameter to "/Shared Documents" it works. It was failing with a file not found error in Powerautomate. Also, when you run it using the PowerShell equivalent.
Simplest way I found around this. In th apply to each nest a condition inside that. If the item display name is equal to Documents - then append a string of /Shared documents, If no then do the regular append of the display name.
Wow! I just tested the scenario, and yes, you are correct. Actually, I changed the library name previously for some other reason, and when I tried this flow, it worked for me. I never noticed that API returned an incorrect name for the OOTB document library. Thanks for catching this and adding a comment. Appreciate. I will pin your comment on top so it will help everyone in the future.
Hello Deepak, I am getting "Not well formatted JSON stream." error at CreateSiteDesign action even after replacing the "/Documents" to "/Shared Documents". I am trying to create a Teams template. Is the process any different for Teams site as compared to Comms site? I am also facing an issue while using "Group#0" webtemplate id to create a Groups connected Teams site. Any ideas would be helpful.
Great video, and possibly the only person on TH-cam to tackle it. We appreciate it very much. So far, everything appears to work as you outlined EXCEPT I don't know where the URL for the newly created site comes from when you are applying the template. It appears it is coming from you manually entering the URL in your form. But can this URL be called from another list? From my research the only location of this is in the Admin Portal, but I can't figure out how to get that info into my List. Any suggestions? I saw this same issue listed below about 7 months ago. Thanks.
Started out nice, but too many errors when invoking CreateSiteScript. Started wit some "Bad request, invalid hostname"- error on my root site. Cause was a space. Now not well formatted JSON stream. I gave up. Too much debugging.
Hello Deepak, Thanks for this video. On Get all Lists and Libraries step I am getting all my libraries but not getting full lists which I have. I have one Tasks list and one Announcement list these are not coming any idea how to get these?
Hi Deepak, Its very useful, I tried all steps and worked, but the look and feel of the my template site is not applied. Any thoughts on how to get look and feel applied? I am creating team site not communication.
this is very useful, thank you very much for this tutorial... However, i got a little bit lost with how to you create/collect URL for the newly created site in your 'Create SharePoint' flow.... can you please clarify this
Great Video , I am able to create the site using this video. Two issues i had faced , Shared Documents and bad gateway . Resolution of 1st one is mentioned in the threads and bad gateway will resolve with the access of Admin Center.
Next problem encountered Cre site Design step. The documentation from Microsoft is wrong. Each item in the body of the step needs quotes around them. e.g. "info" 'Title" "Description" etc. If you copy paste it from Docs or copy what is in the video you will get invalid Json errors or unexpected errors. Just add the quotes around each item and it will work. If you look at the documentation and other steps you will see that the docs entry is missing those.
@Phil I got this error while saving the flow........"Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'Apply_to_each' referenced by 'inputs' in action 'Append_to_array_variable_for_List_Type' are not defined in the template.'.'. "
Hi Deepack , The video is great but there is one thing that I do not understand : when you reach the step CreateSiteDesign, why is the URL ( first flow parameter) the one of the site that was used as a template? isn't all already in the script? Also in my template i have lists that have a Display Name different from the Internal name . I had to change your example to use internal name of lists : exemple : List One Display Name "fiscalité" and internal Name "fiscalite" the included list name retrieved in the "get All lists and library" was fiscalité ( causing an object not found error) when i modified the array to the internal Name fiscalite I could create the script
Thank you very much, Deepak. Really helpful. But is there any way to create Group orient SharePoint Team site that will allow me to associate with MS Teams? STS#3 is only for Non-group associated Team Site 😞
is there a limitation that we can only create communication site or non group connected site STS#3?
2 ปีที่แล้ว
It is a great tutorial perfectly explained. The whole process is very understandable and it will make it easier for me to make important changes in my projects. Thank you very much.
Hi Deepak, Really good Video., It saved my efforts.. I would like to know does this site template will take Webpart details. I want to use the couple of webparts in newly created site with this approach. Waiting for response
I dont know why, but, when i CreateSiteDesign, and select WebTemplate 64 (Team Site), when i create a modern site, the site is created but without the scripts... nothing happens. Then, i change to 68, and i can create the team site and the script works
I came across major issue. when trying to get all lists and libraries, it only pulls out Documents library but not any folders within the Documents library. Any idea why or how to change it?
Folders are data not structure that will save in template. You may need to create folders after Document Library provisioned. There is an action under SharePoint connector to create folders.
HI Deepak I have created the with list an library but the item inside the list and library is not getting created how can achieve it. I tried using create item action but is does not work for me as I am adding the dynamic url then column names are not coming please let me know if any other way is there to achieve it
For data you may need to use a migration tool. if you don't have a lot of data, you can use Power Automate. check this th-cam.com/video/S_nb6MRprug/w-d-xo.htmlsi=2Jmq4pKxYbat8NRh
I have tried to follow along, but I get up to the 11 minute mark to send the HTTP request. It works well, but fails with a 404 file not found error when trying to pull the data from the site.
Hi Deepak, Thanks for this! Is it possible to automate/push any updates made to the template on to any sites created from / linked to the template? Our ambition is to have all sites aligned automatically to a master template. Thanks again
I have access to the admin center of SharePoint for my corporate tenant. Still it is failing at getsite script with a bad Gateway error. however, when I run the same flow in my personal o365 tenant it worked. could anyone help here?
Hi Deepak Very impressive work. I ran it a problem at the last part of the video; AddSiteDesignTaskToCurrentWeb. I get "Attempted to perform an unauthorized operation.". What kind of permission do I need to have? I was told I already have SharePoint Administrator role. Appreciate your kind advice. Thank you.
Hi Deepak, I'm facing error (File Not Found. clientRequestId: 5ac0c1aa-f70e-4d74-8fa0-ce18cb0e42d2 serviceRequestId: c8afd8a0-604d-4000-0f83-7ea80e9a16c9) in step "getting site script". Can you help ?
Hello, i`ve tried to replicate the workflow that you created but unfortunately it seems that during the CreateSiteScript step the flow is stuck and retries for a couple of times giving me Bad Gateway message each time. Do you know what might be the issue?
Hello Deepak, I'm trying to replicate your flow as above but unfortunately; I'm facing an error on the "CreateSiteDesign" property. The error is the following: Not well formatted JSON stream. clientRequestId: 0a4ef18d-7918-46ae-8aec-061d48b822c6 serviceRequestId: 7c4c2da0-900c-3000-e3e1-50cedf76815c Thus, can you advise me so I can solve this issue please? And can you provide us with a link to the full Power Automated solution if you don't mind? Any help would be very appreciated, Thank you.
I found out that the default documents library comes back as Documents which is the display name but not the URL name. It needs to be Shared Documents. In my SharePoint default document library name was changed, so it works for me. Please rename the default document library, or you can use the following expression to make it work concat('/',if(equals(items('Apply_to_each')?['DisplayName'],'Documents'),'Shared Documents', items('Apply_to_each')?['DisplayName']))
@@DeepakShrivastava hey deepak, i hope all is well, yes that was the problem, I figured it out and the flow worked properly. Thank you for your reply and for these amazing videos, I really appreciate it, keep it you 👌🙏
Hi @@DeepakShrivastava - I have this same error at the CreateSiteDesign stage, and I'm not sure where to place the above concat statement, can you help please?
Fantastic video Deepak! Really something which I have been looking to achieve for a while. Everything has worked for me except the home page hasn't taken the new template?? Any ideas why this would be or where I could look to solve this. All my steps have run successfully according to Power Automate
Hi Elliot, i am having the same issue right now! did you manage to solve this? All of my flows have worked and gone through successfully but when applying the template the page says it's completed but after refreshing the page it's the same?! any ideas?
I get a file not found error when adding in the api uri "/_api/Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteScriptFromWeb" any hints on this
give by @Deepak Shrivastava I found out that the default documents library comes back as Documents which is the display name but not the URL name. It needs to be Shared Documents. In my SharePoint default document library name was changed, so it works for me. Please rename the default document library, or you can use the following expression to make it work concat('/',if(equals(items('Apply_to_each')?['DisplayName'],'Documents'),'Shared Documents', items('Apply_to_each')?['DisplayName']))
If you are like me and missed the Pinned Comment and the very last comment that says Shared Documents is the usual cause. Look at those comments. Secondly, the way I figured out my specific issue is replacing the 'Outputs' value in the step with individual library/list names from the array until you find out which one is causing the issue.
HI Deepak great video.
Found a bug in the first part of extracting the site script . At least when i tried to extract.
The default documents library comes back as Documents which is the display name but not the URL name. It needs to be Shared Documents. I see you changed it to Department documents in the video.
When I change the parameter to "/Shared Documents" it works.
It was failing with a file not found error in Powerautomate. Also, when you run it using the PowerShell equivalent.
Simplest way I found around this. In th apply to each nest a condition inside that. If the item display name is equal to Documents - then append a string of /Shared documents, If no then do the regular append of the display name.
@@Worrelpa Many Thanks Phil!!! I have spent quite some time trying to solve this....
Wow! I just tested the scenario, and yes, you are correct. Actually, I changed the library name previously for some other reason, and when I tried this flow, it worked for me. I never noticed that API returned an incorrect name for the OOTB document library. Thanks for catching this and adding a comment. Appreciate. I will pin your comment on top so it will help everyone in the future.
Glad you were able to make it work.
hi Phil! hope you doing fine. can you please share a screenshot of the "Apply to each" action? Actually, it's still not working for me.
Hello Deepak, I am getting "Not well formatted JSON stream." error at CreateSiteDesign action even after replacing the "/Documents" to "/Shared Documents". I am trying to create a Teams template. Is the process any different for Teams site as compared to Comms site? I am also facing an issue while using "Group#0" webtemplate id to create a Groups connected Teams site. Any ideas would be helpful.
Hello Deepak thanks for vedio, one doubt in CreatSiteScript step why you entered different site address?
Great video, and possibly the only person on TH-cam to tackle it. We appreciate it very much. So far, everything appears to work as you outlined EXCEPT I don't know where the URL for the newly created site comes from when you are applying the template. It appears it is coming from you manually entering the URL in your form. But can this URL be called from another list? From my research the only location of this is in the Admin Portal, but I can't figure out how to get that info into my List. Any suggestions? I saw this same issue listed below about 7 months ago. Thanks.
Started out nice, but too many errors when invoking CreateSiteScript. Started wit some "Bad request, invalid hostname"- error on my root site. Cause was a space. Now not well formatted JSON stream. I gave up. Too much debugging.
Hello Deepak,
Thanks for this video.
On Get all Lists and Libraries step I am getting all my libraries but not getting full lists which I have.
I have one Tasks list and one Announcement list these are not coming any idea how to get these?
Can you include site pages when doing this? For instance, if I have my Site Template Home page configured it a specific way, can I apply that as well?
Hi Deepak, Its very useful, I tried all steps and worked, but the look and feel of the my template site is not applied. Any thoughts on how to get look and feel applied? I am creating team site not communication.
Excellent work! Subscribed! :)
this is very useful, thank you very much for this tutorial... However, i got a little bit lost with how to you create/collect URL for the newly created site in your 'Create SharePoint' flow.... can you please clarify this
Does this flow even copies the custom sharepoint groups created and assigned those group permissions to any of the lists or libraries?
Great Video , I am able to create the site using this video. Two issues i had faced , Shared Documents and bad gateway . Resolution of 1st one is mentioned in the threads and bad gateway will resolve with the access of Admin Center.
You're a hero for the bad gateway solution
Amazing video and explained very well. Thanks for sharing this information Deepak!
This is really interesting. Thank you!
Glad you enjoyed it!
Great video, thanks for this! Are you able to provide instructions on how to delete these site templates if we no longer want them?
Next problem encountered Cre site Design step. The documentation from Microsoft is wrong. Each item in the body of the step needs quotes around them. e.g. "info" 'Title" "Description" etc. If you copy paste it from Docs or copy what is in the video you will get invalid Json errors or unexpected errors. Just add the quotes around each item and it will work. If you look at the documentation and other steps you will see that the docs entry is missing those.
This is standard approach to define JSON object in power automate body . you should either use "Name" or 'Name'.
@Phil I got this error while saving the flow........"Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The repetition action(s) 'Apply_to_each' referenced by 'inputs' in action 'Append_to_array_variable_for_List_Type' are not defined in the template.'.'. "
can you please help me with this as well... Thanks in anticipation!
another very good observation
Can confirm I had to add quotes to all Line Items in the CreateSiteDesign step.Then it started working.
Hi Deepack , The video is great but there is one thing that I do not understand : when you reach the step CreateSiteDesign, why is the URL ( first flow parameter) the one of the site that was used as a template? isn't all already in the script?
Also in my template i have lists that have a Display Name different from the Internal name . I had to change your example to use internal name of lists :
exemple : List One Display Name "fiscalité" and internal Name "fiscalite"
the included list name retrieved in the "get All lists and library" was fiscalité ( causing an object not found error) when i modified the array to the internal Name fiscalite I could create the script
Thank you very much, Deepak. Really helpful. But is there any way to create Group orient SharePoint Team site that will allow me to associate with MS Teams? STS#3 is only for Non-group associated Team Site 😞
Do you need full Admin access to the SharePoint to be able to successfully follow these steps?
have you got any video to show how to Delete Site Template?
is there a limitation that we can only create communication site or non group connected site STS#3?
It is a great tutorial perfectly explained. The whole process is very understandable and it will make it easier for me to make important changes in my projects. Thank you very much.
Hi Deepak, Really good Video., It saved my efforts.. I would like to know does this site template will take Webpart details. I want to use the couple of webparts in newly created site with this approach. Waiting for response
I get bad gateway error in GetsiteScript step. What could be the issue?
Have you found a fix yet?
I dont know why, but, when i CreateSiteDesign, and select WebTemplate 64 (Team Site), when i create a modern site, the site is created but without the scripts... nothing happens.
Then, i change to 68, and i can create the team site and the script works
Interesting! something it take more than usual time to get applied. I have not seen this issue before though.
I came across major issue. when trying to get all lists and libraries, it only pulls out Documents library but not any folders within the Documents library. Any idea why or how to change it?
Folders are data not structure that will save in template. You may need to create folders after Document Library provisioned. There is an action under SharePoint connector to create folders.
HI Deepak
I have created the with list an library but the item inside the list and library is not getting created how can achieve it. I tried using create item action but is does not work for me as I am adding the dynamic url then column names are not coming please let me know if any other way is there to achieve it
Hello Deepak - What permission require to run GetSiteScriptFromWeb ? my one is keep retying and no errors in that step but does not retrieve results.
is the permission system also included in the site template?
Hi Deepak
I am able to create the list and it column how can I copy the data also from the source site
For data you may need to use a migration tool. if you don't have a lot of data, you can use Power Automate. check this th-cam.com/video/S_nb6MRprug/w-d-xo.htmlsi=2Jmq4pKxYbat8NRh
Have you build a timeline in power apps?
I have not but will give a try.
I have tried to follow along, but I get up to the 11 minute mark to send the HTTP request. It works well, but fails with a 404 file not found error when trying to pull the data from the site.
Hi Deepak, Thanks for this! Is it possible to automate/push any updates made to the template on to any sites created from / linked to the template? Our ambition is to have all sites aligned automatically to a master template. Thanks again
Can we take site template from a subsite using this tutorial. I tried that "badgatway" error came
is there a MS graph version of this instead?
I have access to the admin center of SharePoint for my corporate tenant. Still it is failing at getsite script with a bad Gateway error. however, when I run the same flow in my personal o365 tenant it worked. could anyone help here?
Deepak.. Its Very useful.. Thanks for creating this video
Thanks and welcome
Hi Deepak
Very impressive work. I ran it a problem at the last part of the video; AddSiteDesignTaskToCurrentWeb. I get "Attempted to perform an unauthorized operation.".
What kind of permission do I need to have? I was told I already have SharePoint Administrator role. Appreciate your kind advice. Thank you.
Hi Dave
I am getting the same error. Did you find a way around it?
Great video. Extremely useful. Is it possible to copy customised libraries, with views and additional columns in the same process?
Thank You for watching. You can export DL design with view and column. what other customization are you referring?
@@DeepakShrivastava Just columns and views. Where can I find the commands to copy and add these? And where in the flow should this be added?
Super
Thanks
Awesome 😎...It’s possible to copy content using api ...???
You can but there is a direct actions in power automate to copy items, so it depends what are you trying to copy.
Is there any provision where we can create site as template and can use it while creating site itself
@deepak srivastav please help
How to share portal URL as api call to Third party
Could you provide a bit more details.
Hi Deepak, I'm facing error (File Not Found.
clientRequestId: 5ac0c1aa-f70e-4d74-8fa0-ce18cb0e42d2
serviceRequestId: c8afd8a0-604d-4000-0f83-7ea80e9a16c9) in step "getting site script". Can you help ?
Hi, I'm facing this same error. were you able to figure it out?
Hello, i`ve tried to replicate the workflow that you created but unfortunately it seems that during the CreateSiteScript step the flow is stuck and retries for a couple of times giving me Bad Gateway message each time. Do you know what might be the issue?
Hi, I also find the same issue. Once i got Admin access of SharePoint admin center , then issue got resolved.
I am also getting same issue. What is the reason?
Hello Deepak,
I'm trying to replicate your flow as above but unfortunately; I'm facing an error on the "CreateSiteDesign" property.
The error is the following:
Not well formatted JSON stream.
clientRequestId: 0a4ef18d-7918-46ae-8aec-061d48b822c6
serviceRequestId: 7c4c2da0-900c-3000-e3e1-50cedf76815c
Thus, can you advise me so I can solve this issue please?
And can you provide us with a link to the full Power Automated solution if you don't mind?
Any help would be very appreciated,
Thank you.
I found out that the default documents library comes back as Documents which is the display name but not the URL name. It needs to be Shared Documents. In my SharePoint default document library name was changed, so it works for me. Please rename the default document library, or you can use the following expression to make it work
concat('/',if(equals(items('Apply_to_each')?['DisplayName'],'Documents'),'Shared Documents', items('Apply_to_each')?['DisplayName']))
@@DeepakShrivastava hey deepak, i hope all is well, yes that was the problem, I figured it out and the flow worked properly.
Thank you for your reply and for these amazing videos, I really appreciate it, keep it you 👌🙏
Thank's Prof s @Deepak Shrivastava I have pass 24 hour to this😅
Now it's work with the change
Hi @@DeepakShrivastava - I have this same error at the CreateSiteDesign stage, and I'm not sure where to place the above concat statement, can you help please?
Fantastic video Deepak! Really something which I have been looking to achieve for a while.
Everything has worked for me except the home page hasn't taken the new template?? Any ideas why this would be or where I could look to solve this. All my steps have run successfully according to Power Automate
Hi Elliot, i am having the same issue right now! did you manage to solve this?
All of my flows have worked and gone through successfully but when applying the template the page says it's completed but after refreshing the page it's the same?! any ideas?
I get a file not found error when adding in the api uri "/_api/Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteScriptFromWeb"
any hints on this
see the pinned comment
give by @Deepak Shrivastava
I found out that the default documents library comes back as Documents which is the display name but not the URL name. It needs to be Shared Documents. In my SharePoint default document library name was changed, so it works for me. Please rename the default document library, or you can use the following expression to make it work
concat('/',if(equals(items('Apply_to_each')?['DisplayName'],'Documents'),'Shared Documents', items('Apply_to_each')?['DisplayName']))
I'm getting "file not found" on the GetSiteScriptFromWeb step (step 6) - any ideas?
Make sure you are trying to get script from the same site that you used in previous steps (save site script)
@@DeepakShrivastava I have made sure the sites are all the same. This is my output error: "status": 404,
"message": "File Not Found.
clientRequestId
"System.IO.FileNotFoundException"
Any ideas on a solution to this one? Having the same problem
If you are like me and missed the Pinned Comment and the very last comment that says Shared Documents is the usual cause. Look at those comments. Secondly, the way I figured out my specific issue is replacing the 'Outputs' value in the step with individual library/list names from the array until you find out which one is causing the issue.