List Trigger Misses Bulk Imported Items: Root Cause and Fix
🔍 WiseChecker

List Trigger Misses Bulk Imported Items: Root Cause and Fix

When you bulk import items into a SharePoint list, the list’s event receiver or Power Automate trigger may not fire for every item. This leaves some items without the expected processing, such as status updates, approval flows, or notifications. The root cause lies in how SharePoint handles bulk operations versus single-item creation. This article explains why triggers miss bulk-imported items and provides a reliable fix to ensure every item is processed.

Key Takeaways: Fixing Bulk Import Trigger Gaps in SharePoint Lists

  • SharePoint list ItemAdded event receiver: Fires only for single-item creation, not for bulk imports via datasheet view or PowerShell.
  • Power Automate “When an item is created” trigger: May skip items when the import uses a batch API or REST endpoint.
  • Workaround using a timer job or scheduled flow: Polls the list for unprocessed items and processes them after the bulk import completes.

ADVERTISEMENT

Why SharePoint List Triggers Fail During Bulk Import

SharePoint list event receivers, such as the ItemAdded or ItemUpdated events, are designed to fire when a user creates or modifies a single item through the user interface. When you bulk import items using methods like the datasheet view (Quick Edit), Microsoft Excel export-import, PowerShell scripts, or CSOM/REST API batch calls, SharePoint often suppresses these events to improve performance. This means the trigger never sees the new items, and any custom code or Power Automate flow that depends on the trigger does not run.

Power Automate flows that use the “When an item is created” trigger behave similarly. The trigger relies on SharePoint’s change log, which may not record bulk operations in the same way as individual user actions. As a result, the flow might process only the first few items or none at all.

The Role of the SharePoint Change Log

SharePoint maintains a change log that tracks additions, modifications, and deletions. Single-item creation adds a clear entry to this log. Bulk imports, especially those using the REST API’s SaveBinaryStream or CSOM’s Add method inside a loop, may combine changes into a single log entry or skip logging entirely. The trigger reads this log to detect new items, so if the log is incomplete, the trigger misses items.

Steps to Fix Missed Triggers After Bulk Import

The most reliable fix involves two parts: disabling the trigger during the import to prevent partial processing, and then running a post-import job that processes all imported items. Below are the detailed steps.

Method 1: Use a PowerShell Script with a Post-Import Processing Loop

  1. Disable the event receiver or flow trigger before import
    In PowerShell, deactivate the ItemAdded event receiver on the target list. Use the command Disable-SPFeature for the receiver feature or set the receiver’s Enabled property to false. For Power Automate, turn off the flow from the flow details page in make.powerautomate.com.
  2. Perform the bulk import
    Import your items using your chosen method: datasheet view, Excel, PowerShell, or REST API. The import runs without triggering any events, avoiding partial processing.
  3. Re-enable the event receiver or flow
    After the import completes, turn the receiver or flow back on using the same method from step 1.
  4. Run a processing script for all imported items
    Write a PowerShell script that queries the list for items created after the import start time. For each item, call your custom processing logic (e.g., update a field, send an email). The script runs the same actions that the trigger would have performed. Example: $items = $list.Items | Where-Object { $_.Created -gt $importStartTime }

Method 2: Use a Scheduled Power Automate Flow as a Polling Job

  1. Create a scheduled flow in Power Automate
    Go to Power Automate and create a new flow with the “Recurrence” trigger. Set the schedule to run every 15 minutes or hourly, depending on your needs.
  2. Add a “Get items” action to fetch unprocessed items
    Use the SharePoint “Get items” action and apply a filter query such as Processed eq 0. If your list does not have a “Processed” column, add a Yes/No column named “Processed” with a default value of No.
  3. Loop through each item and apply your logic
    Add a “Apply to each” action. Inside the loop, perform your processing steps: update a field, send an approval, or call an HTTP request. After processing, update the “Processed” column to Yes so the flow does not reprocess the item in the next run.
  4. Run the scheduled flow after the bulk import
    Trigger the flow manually once or wait for the next scheduled run. The flow will pick up all items where Processed is No, including those missed by the original trigger.

Method 3: Modify the Import Script to Call the Trigger Manually

  1. Add a processing call inside the import loop
    If you are using a PowerShell or C# script to import items, add a line after each Add method that calls your custom processing function. For example, after $list.Add($item), call Process-Item($item).
  2. Use a delay to avoid throttling
    Add a small delay, such as Start-Sleep -Seconds 1, between each iteration to prevent SharePoint throttling. This ensures each item is processed before the next one is added.
  3. Test with a small batch first
    Import 10 items and verify that each one receives the expected processing. If the delay causes the import to take too long, consider Method 2 instead.

ADVERTISEMENT

If the Trigger Still Misses Items After the Main Fix

SharePoint Throttling Stops the Processing Script Midway

SharePoint may throttle your processing script if it runs too many requests in a short time. This results in some items being processed and others skipped. To avoid throttling, add exponential backoff or a longer delay between requests. For PowerShell, use Start-Sleep -Seconds 2 and increase the delay if you receive HTTP 429 responses.

Power Automate Flow Times Out for Large Imports

A scheduled flow that processes thousands of items may exceed the 30-day timeout limit for a single flow run. Split the import into smaller batches of 500 items each. Use a separate flow run for each batch, or use a parent flow that triggers child flows per batch.

Custom Event Receiver Not Re-enabled After Import

If you disabled the event receiver during the import and forgot to re-enable it, subsequent single-item creations will also be missed. Always verify the receiver status after the import by running a PowerShell command that checks the EventReceivers property of the list. Re-enable it if disabled.

Item Single-Item Creation Bulk Import
Event receiver fires Yes No (suppressed)
Change log entry Detailed per item Merged or missing
Power Automate trigger Fires immediately May skip items
Recommended processing method Event receiver or flow Post-import script or scheduled flow

You can now handle bulk imports without losing trigger-based processing. Apply the scheduled flow method or the post-import script to ensure every item is processed. For future imports, add a “Processed” column to your list and set it to No by default. This makes it easy to identify unprocessed items and run a cleanup flow whenever needed.

ADVERTISEMENT