Skip to content

Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Problems
  • Triggers
  • Application specific solutions
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
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.

8 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

Leave a Reply Cancel reply

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

Now available:

The Ultimate Power Automate expressions cheat sheet
Equip yourself with the tool to translate your thoughts into Power Automate expressions!

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.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • Format results of date calculation in SharePoint columnJune 29, 2022
  • Why is your Power Automate flow creating duplicatesJune 26, 2022
  • How to create a unique identifier in your Power Automate flowJune 22, 2022
  • How to assign custom SharePoint permission level with Power AutomateJune 19, 2022
  • Remove permissions from a specific SharePoint user with Power AutomateJune 15, 2022

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

© 2022 Let's POWER Automate | Powered by Superbs Personal Blog theme