How to auto trigger item modified event on a large list using Power Automate?

Problem

I have a large list (named ‘URL2SiteOwnersEmailList’) and want to run an item modified event to all items using Power Automate. This item modified event can trigger a workflow to do some actions on each item.

Step by step Solution:

The First workflow call it kickerFlow to automate to modify items in the large list. You can trigger with manual button.

  1. Create a ‘yes/no’ choice field ‘WFStarter’ on the existing large list. The default value should be No. Also make sure any existing workflow on the large list is currently turned off.
  2. Create a manually button trigger or recursive flow.
  3. Add SharePoint ‘Get items’, (Note: You can create Limit Columns by View to get only ID and WFStarter columns)
Get Items action on a large list
  1. Add Apply Each for the “value” output of the “Get Items”
  2. In the loop add the condition as following. To check whether the WFStarter Flag is null or No.
A condition to check WFStarter is null or false
  1. If the condition is true then do nothing as the default WFStarter is No. But if the condition is false that means the flag was turned Yes, we need to make the flag WFStarter =No. Here is the Send HTTP to SharePoint actions.
  2. If the condition is true then do nothing as the default WFStarter is No. But if the condition is false that means the flag was turned Yes, we need to make the flag WFStarter =No. Here is the Send HTTP to SharePoint actions.
“Send an HTTP request to SharePoint” action to make the WFStarter Flag to false
_api/web/lists/GetByTitle('URL2SiteOwnersEmailList')/items('Apply_to_each)?['ID'])
# Headers
{
"content-type": "application/json;odata=verbose",
"IF-MATCH": "*",
"X-HTTP-Method": "MERGE"
}
#Note: Change the list name.
{
"_metadata": {
"type":"SP.Data.URL2SiteOwnersEmailListListItem"
},
"WFStarter":false
}
  1. Add one more “Send an HTTP request to SharePoint action with every this as shown above except make sure your WFStarter is true.

Now the second workflow with item modified event trigger.

  1. Add When an item is created or modified trigger.
  1. Click on the “…” and “Settings” and make sure your Trigger Conditions is set to the following.
    @equals(triggerOutputs()?[‘body/WFStarter’],true)
    This will make sure the trigger fires only when items is modified for WFStarter=True (aka Yes). For any other items modification trigger will not fire.

A Tigger Conditions

About Pankaj

I am a Developer and my linked profile is https://www.linkedin.com/in/pankajsurti/
This entry was posted in Power Automate, Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s