How to create List's template from existing list

Anonymous
2024-04-18T19:26:28+00:00

Hello,

I have list on SharePoint Online and I need to create tamplate from it. I need send this tamplate to other person. Is possible to do it? If yes, what I should do?

Microsoft 365 and Office | SharePoint | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

9 answers

Sort by: Most helpful
  1. Anonymous
    2024-04-19T03:52:19+00:00

    Dear Radosław,

    There are some ways doing that.

    One way is to create a Power Automate flow and share the flow with the users to create the list automatically.

    You can create a flow for users to define the site URL and the list name to create the list and then add the columns to it automatically.

    The flow can be like the following.

    Create list

    Method: POST

    Uri: _api/web/lists

    Headers:

    {

            "Accept": "application/json;odata=verbose",
    
            "Content-Type": "application/json;odata=verbose"
    
        }
    

    Body:

    {

            \_\_metadata:
    
            {
    
                type: "SP.List"
    
            },
    
            Title: "@{triggerBody()['text\_1']}",
    
            Description: "@{triggerBody()['text\_1']}",
    
            BaseTemplate: 100
    
        }
    

    Create the column array to add multiple columns to the list. In my example, I add the Text, Date, Number and Currency type columns.

    [

    "{'__metadata':{'type':'SP.FieldText'},'FieldTypeKind':2,'Title':'ExpenseTitle'}",

    "{'__metadata':{'type':'SP.FieldDateTime'},'FieldTypeKind':4,'Title':'Phase1Date'}",

    "{'__metadata':{'type':'SP.FieldNumber'},'FieldTypeKind':9,'Title':'CostCenter'}",

    "{'__metadata':{'type':'SP.FieldCurrency'},'FieldTypeKind':10,'Title':'Expenses'}"

    ]

    Add the columns to the list

    Method: POST

    Uri: _api/web/lists/getByTitle('@{triggerBody()['text_1']}')/fields

    Headers:

    {

                   "Accept": "application/json;odata=verbose",
    
                   "Content-Type": "application/json;odata=verbose"
    
               }
    

    Body:

    items('Apply_to_each')

    Another way may be to use Site Script with Power Automate or PowerShell.

    You can refer to the information in my posts below for the detailed steps.

    Save a SharePoint Site Template - Microsoft Community

    How to Create a Backup of SharePoint Site. - Microsoft Community

    What are the best options to move a document library to a new - Microsoft Community

    Welcome to share your updates at your convenience.

    Thank you for your effort and time.

    Sincerely

    Cliff | Microsoft Community Moderator

    0 comments No comments
  2. matt howell 3,501 Reputation points
    2024-04-19T03:55:22+00:00

    There's a much simpler way ----- Open the list settings and click 'save list as template". You can share the .stp file and use it to recreate the list elsewhere by uploading it to the list template gallery. Keep in mind there are very restrictive limits on file size if you include contents.

    Image

    0 comments No comments
  3. Anonymous
    2024-04-19T07:27:53+00:00

    Dear Radosław,

    Thanks for your updates.

    If you are the administrator, you can currently enable custom script via the steps in Allow or prevent custom script - SharePoint in Microsoft 365 | Microsoft Learn.

    However, some changes are being made on the custom script.

    Removing Custom Scripting on SharePoint Sites - Microsoft Community Hub

    So for all site, I suggest you use the site script way with Power Automate or PowerShell instead of the old list template feature in the modern sites.

    Thank you for your effort and understanding.

    Sincerely

    Cliff | Microsoft Community Moderator

    0 comments No comments
  4. Anonymous
    2024-04-19T04:18:32+00:00

    Dear Radosław,

    Please note that the way Webbrewers provided isn't supported in the general modern sites (the modern group-connected sites). You may use the ways I mentioned above in the modern group-connected sites to move forward.

    Manage list templates - Microsoft Support

    @Webbrewers, thanks for sharing the suggestions and opinions here.

    Thank you for your effort and time.

    Sincerely

    Cliff | Microsoft Community Moderator

    0 comments No comments
  5. Anonymous
    2024-04-19T07:16:51+00:00

    Hello,

    thank you for answer. Could you tell me more about custom script? What I should do after enabling this options?

    0 comments No comments