web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trigger a flow once wh...
Power Automate
Unanswered

Trigger a flow once when multiple SP list items added

(0) ShareShare
ReportReport
Posted on by 20

I have a scenario where multiple rows in a SharePoint List are created at once and I would like to trigger a flow once, not per item added.

 

The user submits a request via a Canvas app which has the option to add multiple code deployment items to the request upon submission.  Through another flow, these line items are all given the same request number.

 

I can easily grab all items based off their request number, but cannot figure out logic or method to have the flow only run once per submission. 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    If the items are created at the same time you can use the When an Item is created trigger and turn off the Split On setting under Settings. That will trigger the flow and send an array of records that were created at the same time to the flow.

  • slockyer Profile Picture
    20 on at

    I've disabled this setting as recommended, however, I'm now encountering an issue where my ODATA filter for my Get-Items is returning a 400.
    This works perfectly fine when I re-enable Split On:

    slockyer_0-1707505687997.png

    The input comes back as if it doesn't recognize the trigger output:
    $filter""RRF eq '' and Created ge '' (String was not recognized as a valid DateTime. Creating query failed.)
     
    RRF is set to @{triggerBody()?['RRF']}, Created is set to @{triggerBody()?['Created']}



  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    Thats because the trigger now returns an array of items that are created at the same time. You'll need to change your code to use an apply to each loop to process that array of items. The triggerBody is no longer a single row so you can't use a value from it directly in a filter without a loop.

  • slockyer Profile Picture
    20 on at

    Definitely could use some help in that regards, too. I'm not familiar with manipulating array data enough where I can get a specific value.

     

    I did the apply to each using the output from the Trigger, and then a compose within that. I can reference Current Item, but how do I select a specific value (ex: RRF and Created) in that to use for my ODATA query? The current goal is to do a Get-Items from the output of the trigger, but only look at the newly created items.

     

    Here's a truncated output from the Trigger;

    "body": {
            "value": [
                {
                    "@odata.etag": "\"1\"",
                    "ItemInternalId": "39",
                    "ID": 39,
                    "RRF": 15,
                    "AssignedTo": [],
                    "AssignedTo@odata.type": "#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser)",
                    "AssignedTo#Claims": [],
                    "AssignedTo#Claims@odata.type": "#Collection(String)",
                    "Repo": "no date",
                    "Created": "2024-02-09T19:03:43Z",
    {
                    "@odata.etag": "\"1\"",
                    "ItemInternalId": "40",
                    "ID": 40,
                    "RRF": 15,
                    "DeployDate": "2024-02-12",
                    "AssignedTo": [],
                    "AssignedTo@odata.type": "#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser)",
                    "AssignedTo#Claims": [],
                    "AssignedTo#Claims@odata.type": "#Collection(String)",
                    "Repo": "date 1",
                    "Created": "2024-02-09T19:03:42Z",

     

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    Manually you can just add ?['fieldname'] to the JSON for current item. But you should have access to dynamic content for each field inside the loop.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard