Create List or Document Library Using Power Automate Flow in SharePoint Online

Create List Using Power Automate Flow in SharePoint Online

No comments

Loading

In this article, we will learn how to Create List Using Power Automate Flow in SharePoint Online. Here we will use the SharePoint Online REST API and send an HTTP request to the SharePoint action. Power Automate does provide many out-of-the box actions to deal with SharePoint Online list items, whether it is a SharePoint Online list or a document library; however, there are certain limitations, or we will not find all needed actions. For example, if we want to create a list, view, or column, we will not find out-of-the box actions. In those scenarios, we need to use the SharePoint Online REST API inside the send an HTTP request to SharePoint action.

How to Create List Using Power Automate Flow in SharePoint Online

Let’s get started creating a list in a SharePoint Online site using the Power Automate flow, where we will use the SharePoint Online REST API and send an HTTP request to the SharePoint Power Automate action.

Here is the screenshot:

Create List Using Power Automate Flow in SharePoint Online
Create List Using Power Automate Flow in SharePoint Online

Parameters in Send an HTTP request to the SharePoint to create list

You need to pass the following parameters:

  • Site Address: Your site URL
  • Method: POST
  • Uri: _api/web/lists
  • Headers: See below
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json"
}
  • Body: See below
{
"Title": "Your list title",
"Description": "Your list description",
"BaseTemplate": 100,
"AllowContentTypes": true,
"ContentTypesEnabled": true
}

In the body, you need to pass your list title, description, and others as per your requirements. To get the list base template ID reference, refer to this article: Top 28 proven SharePoint List Template IDs In SharePoint Online/SharePoint 2019/2016/2013/2010/2007

Note:

  • The above flow is applicable while you want to create document library in SharePoint Online as well.

Once we execute the above Power Automate flow, we can see that a new list has been created on the given site.

Create List Using Power Automate Flow in SharePoint Online Demo
Create List Using Power Automate Flow in SharePoint Online Demo

Get List ID SharePoint Online using Power Automate

Well, by now, we have learned how to create a list in SharePoint Online using Power Automate Flow. Now, we will learn how to get a list ID in SharePoint Online using Power Automate Flow with the help of the SharePoint Online REST API and Power Automate Send an HTTP request to SharePoint action. So, let’s get into that.

Here is the flow configuration:

Get List ID SharePoint Online using Power Automate
Get List ID SharePoint Online using Power Automate

Parameters in Send an HTTP request to the SharePoint to Get List ID

You need to pass the following parameters:

  • Site Address: Your site URL
  • Method: GET
  • Uri: See below:
_api/web/lists/getbytitle('Your List Title')?$select=Id
  • Headers: See below
{
"Accept": "application/json;odata=nometadata",
"Content-Type": "application/json;odata=nometadata"
}
  • Body: Empty

 

See Also: To Get the List ID in SharePoint Online manually, refer to this article: Instantly get SharePoint list URL by list ID – Office 365

FAQs: About list in SharePoint Online

Following are the frequently asked questions on the list on the SharePoint Online site; these are good to know for better understanding:

What is a List in SharePoint Online?

In SharePoint Online, a list is a fundamental building block used to store and manage information. It’s a structured container for organizing and sharing data, somewhat similar to a table in a database or a spreadsheet. Lists enable users to collaborate, track, and manage information efficiently within a SharePoint site. They are a core component of the SharePoint platform, and there are various types of lists that cater to different needs.

Here are some key points about lists in SharePoint Online:

  • Data Storage: Lists are used to store various types of data, such as contacts, tasks, announcements, calendar events, discussion topics, documents, and more.
  • Customization: SharePoint lists can be customized to include specific columns (fields) that are relevant to the type of data being stored. These columns can be of various types, such as text, number, date, choice, person/group, and more.
  • Views: Lists support different views, which are predefined arrangements of columns and sorting orders to present the data in meaningful ways. Users can create, customize, and save their own views.
  • Collaboration: Lists can be shared with other users or groups, allowing multiple people to contribute, edit, and interact with the data simultaneously.
  • Versioning: SharePoint lists can be set to track versions of items. This is particularly useful for document libraries, where different versions of a document can be stored and managed.
  • Workflows: Lists can be associated with workflows to automate processes such as approval, review, and notification workflows.
  • Integration: SharePoint lists can be integrated with other SharePoint features, such as alerts, metadata, search, and web parts.
  • Templates: SharePoint provides several list templates for common scenarios like announcements, tasks, calendars, issues, surveys, etc. These templates offer predefined columns and settings tailored to specific purposes.
  • Custom Lists: In addition to using templates, users can also create custom lists with their own columns and settings to suit unique requirements.
  • Data Import/Export: Lists can be imported and exported using various methods, including Excel, making it easy to migrate data in and out of SharePoint.
  • Permissions: Lists can have unique permissions, allowing administrators to control who can view, edit, and manage the data within the list.

SharePoint Online lists offer a versatile and organized way to manage and collaborate on various types of information within a SharePoint site. They form a fundamental component of SharePoint’s capabilities for content management, collaboration, and business process automation.

What is a Document Library in SharePoint Online?

In SharePoint Online, a document library is a specialized type of list that is designed primarily for storing, managing, and collaborating on documents. It provides a structured and organized way to store files, such as Word documents, Excel spreadsheets, PowerPoint presentations, PDFs, and more. Document libraries offer features specifically tailored to document management and collaboration scenarios.

Here are some key features and characteristics of document libraries in SharePoint Online:

  • File Storage: Document libraries are used to store various types of files and documents. These files can be organized into folders and subfolders to maintain a hierarchical structure.
  • Versioning: Document libraries support version history, allowing users to keep track of changes made to documents over time. This is helpful for tracking edits, reverting to previous versions, and maintaining an audit trail.
  • Check In/Check Out: Documents can be checked out by users, preventing others from editing them while they are being worked on. This ensures that only one person is making changes at a time to avoid conflicts.
  • Co-authoring: SharePoint Online supports real-time co-authoring, enabling multiple users to simultaneously collaborate and edit the same document without interfering with each other’s changes.
  • Metadata: Document libraries can be enhanced with metadata columns, which provide additional information about documents, such as author, department, project, or any other custom attributes. This metadata helps in better organization and searching.
  • Permissions: Just like lists, document libraries can have unique permissions, allowing administrators to control who can access, view, edit, and delete documents.
  • Version Control: Document libraries allow you to define how many versions of a document to retain and whether to create major versions (like 1.0, 2.0) or minor versions (like 1.1, 1.2) with each update.
  • Document Templates: Document libraries can include document templates, making it easier to create new documents with a consistent format.
  • Workflows: Document libraries can be associated with workflows to automate processes such as approval, review, and content routing.
  • Content Types: SharePoint allows you to define custom content types, which bundle specific metadata, document templates, and workflows together. These can be associated with document libraries to streamline document management.
  • Integration: Document libraries are tightly integrated with other SharePoint features, such as search, metadata navigation, alerts, and custom views.
  • Sync: SharePoint Online document libraries can be synchronized with the OneDrive for Business client, allowing users to access and work on documents directly from their local devices.

Document libraries in SharePoint Online provide a robust and collaborative environment for managing documents within an organization. They are a crucial component of SharePoint’s content management capabilities, enabling teams to efficiently store, share, and collaborate on documents while maintaining version control and security.

List vs Library in SharePoint Online

In SharePoint, both lists and libraries are fundamental components used for storing and managing information, but they have different primary purposes and features. Here’s a comparison of lists and libraries in SharePoint:

Lists:

Purpose:

  • Lists are designed to store and manage structured data. They function similarly to tables in a database or spreadsheet, allowing you to create, edit, and display various types of information.

Data Format:

  • Lists consist of rows and columns. Each row represents an item, and each column represents a field of data. Columns can have different data types like text, number, date, choice, person/group, and more.

Examples:

  • Task List: A list of tasks assigned to different team members with due dates and status.
  • Contact List: A list of contacts with names, email addresses, and phone numbers.
  • Discussion Board: A list of discussion topics and replies in a threaded format.
  • Survey: A list of questions and responses for collecting feedback.

Features:

  • Custom Views: Lists support the creation of custom views to display specific columns and filter criteria.
  • Sorting and Filtering: Users can sort and filter list data based on column values.
  • Versioning: Lists can track changes to items and maintain a history of versions.
  • Permissions: Each list can have unique permissions to control access at the item or list level.
  • Workflows: Lists can be associated with workflows to automate business processes.
  • Integration: Lists integrate with other SharePoint services and features.

Collaboration:

  • Lists are ideal for scenarios where structured data needs to be collaboratively managed, tracked, and reported on by multiple users.

Document Libraries:

Purpose:

  • Document libraries are specialized for storing and managing documents and files. They provide a structured way to organize and collaborate on various file types.

Data Format:

  • Document libraries are organized into folders and subfolders. Each file is an item in the library, and metadata can be associated with files using columns.

Examples:

  • Shared Documents Library: A repository for team or departmental documents.
  • Project Files Library: A place to store files related to a specific project.
  • Proposal Library: A collection of proposal documents with associated metadata.

Features:

  • Versioning: Document libraries support version history, allowing tracking of changes to files over time.
  • Check In/Check Out: Files can be checked out by users to prevent concurrent editing conflicts.
  • Co-authoring: Multiple users can collaborate on the same document simultaneously.
  • Metadata: Additional information (metadata) can be associated with files using columns.
  • Permissions: Document libraries can have unique permissions for controlled access.
  • Workflows: Workflows can be attached to libraries for document approval or review processes.
  • Integration: Document libraries integrate with Microsoft Office applications and OneDrive for Business.

Collaboration:

  • Document libraries are particularly useful for collaborative document creation, editing, and management, ensuring version control and efficient teamwork.

In summarize this, while both lists and libraries serve as repositories for data in SharePoint, lists focus on structured data and flexibility, whereas libraries are tailored for document and file management, with features that cater to document collaboration, versioning, and organization. The choice between a list and a library depends on the nature of the content you’re working with and the collaboration needs of your team or organization.

What is the use of SharePoint List ID or GUID?

In SharePoint, every item within a list or library is assigned a unique identifier called a List Item ID or GUID (Globally Unique Identifier). This identifier is generated automatically and serves several purposes:

  • Uniqueness: The primary purpose of a GUID is to provide a globally unique identifier for each item in a list or library. This uniqueness is crucial for ensuring that no two items share the same identifier, even across different lists or sites.
  • References: GUIDs are used to reference and identify specific items in the context of SharePoint. For example, when constructing URLs or queries that point to a particular item, the GUID ensures accurate identification, even if item names or other attributes change.
  • Programming: GUIDs are used extensively in SharePoint programming, especially when working with the SharePoint API, workflows, custom applications, and integrations. Developers use GUIDs to uniquely identify and manipulate items programmatically.
  • Data Integrity: GUIDs play a role in maintaining data integrity, especially when items are moved, copied, or replicated between lists, libraries, or sites. Because GUIDs are unique across the SharePoint environment, they help ensure proper identification during data operations.
  • Merging and Syncing: In scenarios involving data synchronization or merging, GUIDs assist in correctly matching and merging items from different sources.
  • Lookup and Relationships: GUIDs are often used to establish relationships between items in different lists or libraries. They provide a reliable way to establish associations even if items are moved or renamed.
  • Cross-Site Identification: GUIDs enable the identification of items across different SharePoint sites and site collections, facilitating the creation of links and references that work across site boundaries.
  • Search and Indexing: GUIDs contribute to efficient searching and indexing of items. When items are indexed, their GUIDs are used to ensure precise retrieval.
  • Replication and Backup: When replicating or backing up SharePoint content, GUIDs ensure that items are properly identified and restored to their original state.

SharePoint List IDs or GUIDs are essential for providing a unique and consistent way to identify items within lists and libraries across SharePoint sites and site collections. They play a critical role in maintaining data integrity, enabling programming tasks, supporting relationships, and ensuring accurate referencing and identification within the SharePoint environment.

Summary: What we had here (Create List in SharePoint Online using Power Automate)?

Thus, in this article, we have learned about how to create a list or document library in SharePoint Online using the Power Automate flow, leveraging the Send an HTTP action to SharePoint action of Power Automate. Then, we learned how to get the List ID from the site. And also, we have understood what a list and document library are in SharePoint Online and when to use them.

In SharePoint, lists and libraries are essential tools for effectively managing and organizing data. Lists are versatile containers for structured information, akin to database tables, offering various data types and customization options. They find application in tracking tasks, contacts, discussions, and more. On the other hand, document libraries are specialized repositories tailored for document and file management. Through folders, metadata, and version control, they facilitate collaborative document creation, maintenance, and co-authoring. Each component serves distinct purposes: lists excel in managing structured data, while libraries streamline document collaboration, ensuring efficient content management within the SharePoint ecosystem.

See Also: Other Helpful Power Automate Articles

You may also like the following Microsoft 365 articles:

 

About Post Author

Do you have a better solution or question on this topic? Please leave a comment