Our company is attempting to automate teams requests. We support 5 different teams types requests from business users. Based on teams type requested, we do specific customizations to Teams and its SharePoint site. We have 5 such teams for reference which we call teams templates.
To clone the customizations for the uncustomized Teams SharePoint site, I followed the following process:
1) Delete the uncustomized Teams SharePoint site. It also deletes the related o365 group.
2) Recover the deleted o365 group from Deleted groups in Admin Portal.
3) Go to Teams Template SharePoint site> Site Settings> 'Save site as Template' (include content). It creates a wsp. Download it.
Note: Our teams template sharepoint sites don't have Publishing features enabled. Also our tenant allows users to run custom script on personal sites and on self-service created sites. These two pre-conditions allow us to have 'Save site as Template' option.
4) Create a new SharePoint site with same name as deleted site in SharePoint Admin Center> Active Sites> Create> Other Options (Templates)> More templates> Custom> Select Template later. Fill form and click OK.
Note: Instead of UI option, we can also 'Save site as Template' using following option:
10) Furthermore, the files uploaded in Teams app for this team gets uploaded in cloned SharePoint site.
Our team tested the teams and found it working well but pointed to below old article from 2017 where Vesa Juvonen (Senior Program Manager, SharePoint Engineering, Microsoft) mentioned not to use 'Save site as Template'.