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

Community site session details

Session Id : 4VEft7livjt569FOVUiiuB
Power Automate - Building Flows
Unanswered

Single Flow workflow which can be triggered on multiple lists with same template

Like (0) ShareShare
ReportReport
Posted on 6 Feb 2019 12:09:47 by 2

Hi All,

 

How can i create an single flow which can attached to multiple lists? Should trigger on item events when happens in multiple lists

 

Thanks,

Shobha

I have the same question (0)
  • jkic Profile Picture
    146 on 22 May 2023 at 07:44:44
    Re: Single Flow workflow which can be triggered on multiple lists with same template

    Hi

    The formula you've copied refers to 'Apply_to_each_Find_List'.  Your apply to Each action must be named exactly that for it to work.  Yours is just called 'Apply_to_each'.  Either rename the Action, or amend the formula to use the correct name.

     If the List name is found, Set Variable will set varIndex to a value greater than zero, so then the Condition returns true.

    No such thing as a dumb question...if I understand you want an email to be sent to people when an item is added, and this should work on several Lists.  My solution was deployed as a button displayed next to each List item.  Users added a new item then clicked a 'Request Approval' button, which appeared/disappeared depending on the Status of the List item.  The button is effectively a bit of json formatting which presents as a button and has an action to run the Flow.  If you want to run the Flow (send the email) automatically this might not be the right solution.  I'm just thinking how it might be adapted.......I see now why you used the 'When a new item is added' trigger, but that limits you to the List specified.  Probably depends how many Lists you have to do this for, but the only thing I can suggest is creating parent Trigger Flows for each List which all call the same child Flow (which sends the email).  Alternatively you could Schedule a single Flow which checks all Lists for new items (Get Lists, followed by Get Items in an Apply to Each loop) and sends an email.  That's probably best if it doesn't have to be 'real time'.  You'd need to consider limits on running Flows before deciding Frequency, but e.g. every 15 minutes could work. 

      

  • vorlot1 Profile Picture
    6 on 22 May 2023 at 06:46:26
    Re: Single Flow workflow which can be triggered on multiple lists with same template

    Thanks jkic for being so patient with me! I managed to get through Step 3 as per your screenshot, and copy+pasting this exact phrase: indexOf(variables('varItemURL'), items('Apply_to_each_Find_List')?['Name'])

    - However, when I tried to save, the message at the top pops up. As I'm honestly not tech-savvy, I'm not really sure what this means. 

     

    vorlot1_0-1684737450080.jpeg

    Q: As for the 'The Condition', which I added as a next action - it seems I can manually put the integer to >0. In your original post, did you mean that this would automatically state this if the 'List Name is found'?

    Q: A bit of a dumb question as we're already deep into this alternative solution - how do I ensure that when a new meeting list item has been created (or triggered) in any of these lists, so that an email is sent to certain people (ie. this step I would use the 'Send an Email' function). As at the moment based on my shallow understanding, this solution is just to ensure a same workflow to be triggered in any lists - but it's not yet specified what will trigger the workflow (if that makes sense?)

     

    Thank you so much for your help, I really appreciate it!

  • jkic Profile Picture
    146 on 22 May 2023 at 04:21:15
    Re: Single Flow workflow which can be triggered on multiple lists with same template

    I'm not quite sure what you're aiming to do with the first question, but the Flow is not designed to be used/referenced in another Flow.  The Flow allows you to run this exact Flow from multiple Lists.

     

    Regarding Step 3, apologies, I didn't screenshot the Get Lists action, which follows the 3 Initialise Variable actions.   The returns the details of all the Lists on your site.  In the Apply to Each you can select 'value' to give you the 'body/value'.  I've revised the screenshots in my original post.

  • vorlot1 Profile Picture
    6 on 22 May 2023 at 03:23:03
    Re: Single Flow workflow which can be triggered on multiple lists with same template

    Thanks so much jkic! I'm able to do Steps 1 & 2, but can I get some clarification on Step 3, in which you stated in your previous responses?: 


    3. The actions below Get all the Lists from your site, and use the Index function to identify a match for a List Name within the List Item URL, using this function
    • indexOf(variables('varItemURL'), items('Apply_to_each_Find_List')?['Name'])
    The Condition returns an integer (>0) if the List Name is found. Then the List Name can be stored as a variable.

    - My queries: Does Step 1 & 2 make a trigger, which I now can close, and then implement into other flows?

    vorlot1_0-1684725234267.png

    From your screenshot above, it looks like you had used the 'Apply to each' function (and renamed it to 'Apply to each Find List'), so I 'Added a new step -> New Action' but in the 'Select an output from previous steps' the 'body/value' doesn't show up: 

    vorlot1_1-1684725754603.jpeg

    Therefore I wasn't sure if you had applied Step 3 within the same flow of Steps 1 & 2 - or you opened a new flow and applied Step 3 to that? And if yes (to the latter), then could you help? 

  • jkic Profile Picture
    146 on 22 May 2023 at 02:53:52
    Re: Single Flow workflow which can be triggered on multiple lists with same template

    Hi.  Step 1 - 'When a SharePoint List item is added' is not the trigger you should use.  Use the Sharepoint 'For a selected item' trigger.

    Step 2 - Initialise Variable is the action used which creates the variables for you to store values in later.  You can rename the Action by clicking on the 3 dots to the right of the Action name.  I renamed all 3 to make it easier to see what they were for.  Make sure the type is as shown in my screenshot, and leave the value blank.

  • vorlot1 Profile Picture
    6 on 22 May 2023 at 02:01:18
    Re: Single Flow workflow which can be triggered on multiple lists with same template

    Hi jkic, thanks very much to your alternative solution! I was trying it out, but could you help advise further? So I tried to do your method, so firstly I opened an existing flow (ie. Send a customized email when a new SharePoint list item is added).

     

    Secondly, I tried to try your No. 2 point above which is to add these 3 steps: 

    • Initialize variable itemurl
    • Initialize variable Index
    • Initialize variable ListName

    However, somehow when I search for such variables it seems I cannot find those and only have 'Initialize variable', and I'm not sure how to find the specific ones 'itemUrl', 'Index', 'ListName' as highlighted above. I'm therefore stuck here. I'm a little technologically challenged - so would be helpful for any further help! Thanks very much.

    vorlot1_0-1684720771150.jpeg

  • jkic Profile Picture
    146 on 18 Apr 2023 at 03:42:31
    Re: Single Flow workflow which can be triggered on multiple lists with same template

    Hi.  That's exactly what my Flow does.  Although you have to choose a specific List in step 1, it still works for other Lists.  So I specified 'Work Progress Tracker' List, but I can select the Flow from my 'Tasks' List and it works.  Any List on the Site can run this Flow.  If I've misunderstood your question please clarify which of my steps aren't clear or provide your own example. 

  • Anug78 Profile Picture
    6 on 17 Apr 2023 at 22:40:09
    Re: Single Flow workflow which can be triggered on multiple lists with same template

    Hello , 
    Can you please share the solution how you achieved using URL  ?  My requirement is, I have multiple lists and wanted to trigger same flow for more than one list . 

  • jkic Profile Picture
    146 on 04 Feb 2021 at 17:28:36
    Re: Single Flow workflow which can be triggered on multiple lists with same template

    1. The first puzzle is how to set the trigger – it requires a specific List to be specified. Pick any List, as, strangely, it doesn’t matter what you choose.

    jkic_8-1612459560296.png


    2. Next you need to initialise variables to help us search the List GUIDs to find which one is contained within our List item URL.

    jkic_9-1612459597055.png

    2a. Get Lists - get all the Lists for your site

    jkic_0-1684728929875.png

     

    3. The actions below search the results of the Get Lists from your site, and use the Index function to identify a match for a List Name within the List Item URL, using this function
    • indexOf(variables('varItemURL'), items('Apply_to_each_Find_List')?['Name'])
    The Condition returns an integer (>0) if the List Name is found. Then the List Name can be stored as a variable.

    jkic_11-1612459670257.png

     

    That’s it really, now you know which List the item was triggered from, and you can get more details of the List Item.

    jkic_12-1612459695564.png

     

    I use a site column to deploy a column to every list with JSON formatting to display a button. The button action contains the Flow ID to run the above Flow.
    Hope this helps.

  • jcmorara Profile Picture
    2 on 31 Jan 2021 at 18:40:59
    Re: Single Flow workflow which can be triggered on multiple lists with same template

    I need something like that. Can you please provide more detail? Thanks in advance. 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete