Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Triggers
  • Resources
  • ABOUT ME
  • Get help with your flow
Menu

Use configuration lists to avoid repeating actions in Power Automate

Posted on February 9, 2022March 7, 2022 by Tom

“I have an approval process with different approvers based on a department, how can I build it in Power Automate without repeating the same actions?”


Every time you start adding repeating actions in your flow, you should pause for a moment. Is it really necessary to have another action, or does it contain only minor changes from the other one? Is it another approval task only to use different approver? Or is it a whole branch in a flow only to send slightly different email? Your flow should never look like the one below.

Power Automate repeating actions

Such flow will have too many actions, it’ll be slow to open, and imagine if you want to do any changes in it. You’d have to update all the duplicate actions with every change you do.

That’s why you should use configuration lists.

Why use a configuration list

A configuration list will help you avoid hard coding inputs directly in your flow. If you have for example an approval process, you don’t want to assign the approval task directly to a specific user in the flow.

Such configuration would mean that if the approver changes, somebody would have to update it in the flow. And if there’s another approval task for a different approver, you’d need another action leading to the first screenshot.

You should always use dynamic contents in this situation, and if it’s not available from previous actions, you’ll need a configuration list.

What is a configuration list

Configuration list is a data source where you can lookup a specific information. In combination with Power Automate it’s often a SharePoint list (or Lists list). Such list contains at least 2 columns – a value used for the lookup, and the value to return. It can be e.g. a list of approvers per user, or a list of approvers per department.

Power Automate repeating actions

How to use a configuration list

To get a value from a configuration list you must add a lookup to the list into your flow. Use the ‘Get items’ action with a Filter Query on the configuration list. Continuing with the list above, you want to get the Approver for the specific department.

The returned item will be the corresponding configuration entry, with the configuration available as a dynamic content. Use it to assign the task. The final flow will then be much simpler.

Power Automate repeating actions

Note: if you don’t like the automatically added ‘Apply to each’, you can remove it, but it’s not a must.

Summary

You should always have a good reason for repeating actions in Power Automate flows. If it’s only to change some value in an action, you should use a configuration list instead. Keep the action only once in the flow, and change its input based on the configuration.

There’s no limit on what your configuration list will look like. You need one column used for the lookup, and then it’s up to you how many more columns with information it’ll have, the usage will be the same. You can even use multiple columns for the lookup, all you have to do is use multiple filters in the Filter Query.

You could even define whole approval paths in the configuration list if you extend it.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

10 thoughts on “Use configuration lists to avoid repeating actions in Power Automate”

  1. Berihun Addis says:
    February 13, 2022 at 8:07 pm

    “I have an approval process with different approves based on a department and Location, how can I build it in Power Automate without repeating the same actions?”

    Reply
    1. Tom says:
      February 15, 2022 at 12:51 pm

      Hello Berihun,
      you can follow the same process – create a configuration list with 3 columns – department, location, and approver, and then lookup to the list using 2 filters in the Filter Query instead of one: https://tomriha.com/how-to-combine-multiple-filters-in-get-items-filter-query-power-automate/

      Reply
  2. Ron Kochanowski says:
    February 16, 2022 at 10:18 pm

    What a great idea! This is the perfect solution to a long winded Switch statement that has minimal changes between the cases. Thanks!!

    Reply
  3. Berihun Addis says:
    February 20, 2022 at 8:04 pm

    How can I use Look up to filter?

    Reply
    1. Tom says:
      February 23, 2022 at 5:35 pm

      Hello Berihun,
      you can filter as described here: https://tomriha.com/power-automate-filter-on-sharepoint-lookup-column/

      Reply
  4. Berihun Addis says:
    February 25, 2022 at 9:09 pm

    Approval Flow with multiple approves – I want to save all Approve Names in one SharePoint Column? how to do this?

    Reply
  5. Jack says:
    May 17, 2022 at 3:59 pm

    Great article ! Thank you.
    However, I have another question, what if the end users can select several department for review? For example, HR and Finance and Sales, all three at the same time?

    Reply
    1. Tom says:
      May 25, 2022 at 4:08 pm

      Hello Jack,
      I don’t know right now how I’d approach that. If it’s different departments then you probably want a different approval task for each of them but at the same time you also want to cancel the other approvals, e.g. HR and Finance in case Sales rejects. Which I think will be quite complicated to do as parallel branches are not connected to each other.

      Reply
  6. Claire M says:
    September 22, 2022 at 5:48 pm

    I’ve done what you have outlined above as I want the approval to go to a head of department based on the list. My flow works however, when it gets to the approval stage, the outcome of my condition always goes to false, even though I have approved the request. I have used the same flow without the list and used a hard coded email for the approver and this works, it is only when I use the get list and use the department email address that I have the issue with the approval outcome always showing as false. Do you have any ideas?

    Reply
    1. Tom says:
      September 27, 2022 at 4:04 pm

      Hello Claire,
      I’d use the basic debugging approach – add a ‘Compose’ action before the ‘Condition’, store both the dynamic contents from the ‘Condition’ in this ‘Compose’, and then you’ll see in the flow run history what values enter the ‘Condition’ and why it’s always false. Once you’ll know the values you can adjust the ‘Condition’ accordingly, e.g. use contains instead of equals, or change the value, e.g. Approve instead of Approved.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Do you know what to do, but not how to do it?

Get The Ultimate Power Automate expressions cheat sheet and translate your thoughts into flows with ease!


There's also the HTTP requests to SharePoint cheat sheet to help you overcome limitations of some standard actions!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

  • How to find Excel rows missing in SharePoint list (Power Automate)March 29, 2023
  • Check whether user exists in AAD with Power AutomateMarch 26, 2023
  • How to highlight whole SharePoint row based on calculated dateMarch 22, 2023
  • Why is your Power Automate flow running so slow?March 19, 2023
  • How to add multiple links to the Power Automate approval taskMarch 15, 2023

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2023 Let's POWER Automate | Theme by SuperbThemes