In this “Power Automate create SharePoint list item if not exists”, we will learn how to create a SharePoint list item if not exists using Power Automate. Like any other traditional language, we can create a list item in SharePoint if not exists – however, if the item already exists, we will update it.
Using Power Automate create SharePoint list item if not exists step by step guide
This is the complete flow – in this demo, what are doing is controlling the Add or Edit item detail in List B from List A. Adding an item to List A, if that item exists in List B it will update otherwise create it, here we are querying the List B with Title column for this demo. So, if the Title column value already exists in List B, it will update that list item otherwise if not exists, it will create a new item.
This is a very simple flow, the first one is the trigger action, and the last two are needed for this item create or edit operation. Let’s expand and explain the Get Items action and Condition control.
Get Items from the SharePoint list with a filter query
Pass the below parameters for the Get items action:
- Site Address – Your site URL
- List Name – Your list name
- Filter Query – Title eq ‘Title from the trigger output when an item is created or modified’
Power Automate check if item exists in SharePoint list
Add a condition control.
Then, add the below conditional check:
- In the above length function, replace this “Get_items_from_list_B” text with your Get Items name text.
- If the output of “Get Items body/value length” is zero, then, the item does not exist in List B, so, it will perform the create item operation – otherwise, the item already exists in List B, so it will perform the update item operation.
Length of the get items output in power automate
Summary: Using Power Automate create SharePoint list item if not exists
Thus, in this article, we have learned the below with respect to creating or updating SharePoint list items using Power Automate:
- How to create a SharePoint list item if not exists.
- How to update a SharePoint list item if already exists the item.
- How to find the length of the output of the “Get Items” action which will determine whether to create or update the item in the SharePoint list.
See Also: Power Automate Tutorial
You may also like the below Power Automate tutorials:
- Promptly generate unique ID in SharePoint list using Power Automate – Microsoft 365
- Best way update list item in SharePoint using Power Automate – Microsoft 365
- 3 ways instantly disable Action in Power Automate
- Instantly in 2 steps Copy and Paste action in Power Automate
- Discover exception handling in power automate using Try Catch Finally Scope – in 3 steps instantly
- Instantly Solved: Error from token exchange: Bad Key authorization token in Power Automate – Microsoft 365
- Scheduler Power Automate: Move Old documents in SharePoint Automatically using Scheduled Cloud Flow
- Conditional trigger power automate: Trigger Power Automate (Flow) based on condition in SharePoint Online – Verified
- Power Automate Send Email: Difference between “Send an email notification (V3)” and “Send an email (V2)”
- HTML Table in Power Automate: Learn HTML table formatting using Microsoft Power Automate step by step
- In just 2 marvelous steps export import power automate flow quickly
- Validate is it really Power Apps = Low Code No Code? Power Apps low code no code
- Get started with Power Automate