Practical Guide: Applying Default Site Templates in Microsoft Teams for Streamlined Collaboration
Tags: sharepoint, microsoftteams, collaboration
Published: 2023-06-27 07:25:18

Are you struggling to collaborate effectively with your team due to inconsistent file organization and sharing practices? Worried about the potential risks of non-compliance with data protection regulations and the confidentiality of sensitive information? Have you noticed a lack of uniformity in document structures within your organization, leading to confusion and delays in work processes?

If these questions resonate with you, this article has the answers you're seeking. We'll explore a **practical solution** that can standardize and enhance collaboration among coworkers. Building upon the concept of **Site Templates** we'll delve into how **Microsoft Teams** can be leveraged to create a standardized **folder template**, focusing on an example from the legal sector. By following this configuration, teams can streamline their file organization, improve collaboration, and ensure compliance with regulatory requirements. Let's dive in and discover how to unlock the full potential of your teamwork in Microsoft Teams.


## The challenge

Effective collaboration among employees is essential for successful outcomes. However, many organizations from all industries face common **challenges** that hinder seamless **teamwork** and **productivity**. Employees often encounter issues such as **non-standard folder structures**, **difficulties in searching** for critical information, **file duplication**, and a lack of unified categorization. These problems can result in frustration, delays, and decreased efficiency in day-to-day operations.

To address these challenges, a company in the legal sector is dedicated to implementing new initiatives that promote **standardized categorization** and compliance with regulations. By adopting a s**tructured approach** to organizing documents and files, the company aims to enhance productivity, improve information retrieval, and foster a collaborative environment where employees can work seamlessly together.


## The approach

The proposed solution is centered around using **Microsoft Teams** to streamline the management of new projects and their corresponding teams. Picture a template that **automatically creates a predefined folder structure** within the "General" channel of each newly formed team. This innovative approach simplifies the organization and management of content, bringing about a revolution in the way teams collaborate.

By utilizing this template, teams can **quickly kickstart** their projects with a consistent set of folders. Whether it's procedures, guidelines, templates, or more, the template ensures that everyone starts off on the same page. This not only **saves time** but also eliminates the manual effort of setting up folders and promotes consistency across teams.

Through the power of automation, this solution significantly enhances the user experience. Team members can dive into their work, knowing that the document structure is already established and easily accessible by everyone. Collaboration becomes seamless, and locating relevant information becomes effortless. This template-driven approach fosters efficiency, productivity, and a streamlined content management process.

![Microsoft Teams folder structure after creating it](https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78a1d2e0-f6fb-48f3-bb76-4e22f5d5591d_1200x380.png)


## Site Templates for the rescue

**Site Templates** provide a powerful mechanism for defining and creating **standardized** designs or **templates** that can be applied across **SharePoint Online** site collections. These templates offer site owners the **flexibility** to select and **apply** specific functionalities to their sites, as discussed in my previous article on [**Unlocking Efficiency: Streamlining Custom Functionality for Site Owners with SharePoint Online Site Templates**](https://intranetfromthetrenches.substack.com/p/unlock-efficiency-using-site-templates).

One notable feature of **Site Templates** is the ability to designate them as the **default template for specific site types**, such as Communication Sites, Team Sites, and Channel Sites. This means that a Site Template with a predefined configuration can be automatically applied whenever any of the aforementioned site types are created.

This functionality brings several advantages, although it may not be suitable for every company with similar needs. It's important to note that when creating a **new Microsoft Teams**, a corresponding SharePoint Online site of the **"Team Site" type** is also created. Therefore, to leverage the benefits of Site Templates, we need to **associate** our **custom Site Template** with the **"Team Site" site template**. This ensures that our desired configuration is automatically applied whenever a new Microsoft Teams is created, along with its associated SharePoint Online "Team Site" site.

![SharePoint Online Documents library with the folder structured already created](https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F90a02639-8cd2-4a86-bcc4-5d4c36fcf551_2304x898.png)

The hierarchical **structure** that has been chosen for organizing the company's legal files provides a fundamental **framework** to ensure efficient management and easy access to information. It encompasses several main folders, including dedicated sections for active cases, filed cases, legal documents, and legal resources. This well-defined categorization allows for streamlined navigation and facilitates the retrieval of relevant files as needed. Team members will be able to navigate the file system more efficiently, leading to increased productivity and streamlined collaboration within the legal department.


## The code

Implementing the solution is a **straightforward process**. It involves two key components: the JSON file defining the actions to be executed and the JSON file specifying the **Site Template**. The first file can be divided into multiple files, each performing specific tasks, allowing reusability across different Site Templates. However, the latter file must be unique, encompassing all the necessary information for site managers to apply the template to their sites.

In the case for storing **legal documents**, the site script would look like this:

```JSON
{
    "$schema": "https://developer.microsoft.com/json-schemas/sp/site-script-actions.schema.json",
    "actions": [
        {
            "verb": "createSPList",
            "listName": "Documents",
            "templateType": 101,
            "subactions": [
                {
                    "verb": "addFolder",
                    "folderPath": "/General/Legal Docs/Contracts"
                },
                {
                    "verb": "addFolder",
                    "folderPath": "/General/Legal Docs/Agreements"
                },
                {
                    "verb": "addContentType",
                    "name": "Contract"
                },
                {
                    "verb": "addContentType",
                    "name": "Agreement"
                }
            ]
        }
    ],
    "bindata": {},
    "version": 1
}
```

The **Site Script** definition file provides a clear and comprehensive overview of the **generated structure**. Take a look, and you'll immediately understand what will be created. Within the "Documents" folder, which is the default library when creating a Microsoft Teams space, there's a nested "General" folder that represents the channel with the same name. This channel-specific folder is where all legal documents will be stored. Additionally, two subfolders are created to further categorize the files, specifically for contracts and agreements.

To complete the remaining folder structure, **additional scripts** will be utilized to define their respective elements. This approach allows for the **versatility** of Site Scripts, as they can be **reused** across different site templates, leveraging existing components within the organization. By **modularizing** the scripts, it becomes easier to customize and adapt the folder structure based on specific needs or requirements, promoting consistency and efficiency throughout various site templates.

I've created a [**GitHub repository**](https://github.com/jaloplo/spo-site-templates-legal-example) containing the **Site Scripts** and **Site Template** discussed in this project. Feel free to check it out and fork it if you find it useful for your own projects. It serves as a straightforward demonstration of the immense potential and practical application of Site Templates. Explore, experiment, and unlock the power of standardized collaboration with ease.


## Summary

In this article, I delved into the transformative **potential of Site Templates and Site Scripts** in revolutionizing collaboration and content organization. These powerful tools offer a solution for companies to boost productivity and ensure standardization.

The **example** presented focused on **Microsoft Teams**, showcasing the creation of a **folder template** after its setup. However, the application extends beyond Teams to other areas such as Communication Sites in SharePoint Online, companies can establish consistent color themes. And define specific elements for private or shared channels in Microsoft Teams.

The **versatility** of SharePoint Online and Microsoft Teams allows for endless possibilities, enabling customization to align with the unique needs of each company. Whether it's optimizing collaboration, maintaining standardization, or tailoring the user experience, **Site Templates** and **Site Scripts** provide the flexibility to adapt and enhance these platforms.


## References

* *spo-site-templates-legal-example Github repo: https://github.com/jaloplo/spo-site-templates-legal-example*
* *Site Script schema: https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json*
* *Thanks to [Hector Sosa](https://dev.to/ekqt), the author of usescreenshot.app application, for allowing framing pictures: https://usescreenshot.app*

> *Don't forget to share the article with your friends and colleagues if you find it interesting, click on the heart if you like it, or click on the comments to share what you think of the article, if you would add more or if you want to clarify any of them.*