Best Practice For Creating Cloud Flows With Microsoft Power Automate

Best Practice For Creating Cloud Flows With Microsoft Power Automate

Mike Chappell

Mike Chappell

Solutions Director - Public Sector|Kerv Digital

Published 06/07/22 under:

Have a question?

Get in touch

Kerv Digital’s Solutions Director lays out the best practices for creating cloud flows when using Power Automate from the Microsoft Stack

 

Power Automate from the Microsoft Stack is a fantastic tool whether you want your automations to be triggered automatically, instantly or via a schedule.

Types Of Cloud Flow

  • Automated flows – An automated cloud flow is triggered by events such as an incoming email from a previously specified individual or perhaps a mention of tour organisation on social media.
  • Instant Flows – Instant cloud flows are there for repetitive tasks from either desktop or mobile devices. As an example, they’re capable of sending reminders to your different teams with the push of a single button on your phone.
  • Scheduled Flows – Scheduled Cloud Flows are for reoccurring automations such as a daily data upload to SharePoint, Dataverse… or in my case filling my timesheets!

A Step By Step Guide To Creating Cloud Flows With Power Automate

  • Connection References – Still in Preview at time of writing and the ALM will surely smooth out soon but meanwhile you still need to make sure you are documenting exactly what they are and how they are connecting (via the user, via a service principal etc) and re-use.  You might be limited to the scale of reuse during Preview but having 3 different connection references to the same Dataverse table in a single flow? You’re creating work for yourself!
  • Secured Inputs & Outputs – It’s absolutely fine to leave this step till after the debug stage but you definitely need to put some thought into what data is visible to people allowed to view your Flow’s run history. Hit the ellipsis in the top right of your action, select Settings and toggle on Secure Inputs and Secure Outputs. Your organisation likely has its own rules on what is considered sensitive but if you’re connecting to Key Vault or working with HR data, I’d be flicking those toggles!
  • Actions Should Have Meaningful Names – When you’re deep in the loops it’s far too easy to lose track of context! Assigning memorable and meaningful names will pay dividends later down the line. You may already have naming policy elsewhere where you work so agree a convention between you and stick to it to help each other out. I’m a fan of descriptive Pascal Case myself.
  • Consider Concurrency In Loops – For an immediate performance boost, head back to Settings and enable concurrency on your loops. Remember it does not tend to play well if you are using variables in there but I find it’s sometime beneficial to engineer away from a variable if it means I can knock 80% off the run time!
  • Don’t Nest Too Deep – I know how hard it is to avoid sometimes but try to avoid nesting too deep. PA itself will impose a limit (8 at time of writing) but your bleeding eyes 10 weeks later when you’re debugging probably have a lower threshold!
  • Error Handling – Do you know what will happen if a step fails? Have you captured said failure? Use Configure Run After to have different follow-on actions depending on the success or failure of key Actions. Stephen Siciliano wrote a great blog all about this.
  • Optimise & Look For Efficiencies – It probably goes without saying but you should always aim for the absolute minimum amount of calls needed to do the job, especially where you are calling potentially slow or expensive APIs. A good example of this is querying Environment Variables, should that be six calls for the six variables or could you make one call with a well thought out Dataverse filter and an array?
  • Variables Should Have Meaningful Names – I’ve already mentioned that your steps should have meaningful names but the same also goes for your variables. A quick tip here, if you are using PowerApps as your trigger, put “ask in PowerApps” dynamics expressions into an Initialise Variable action and give both the action and variable a good name to reap a much more meaningful prompt to your users over in their Canvas Apps.
  • Cloud Flows Should Be In Solutions – It’s getting better all the time but it can still be confusing to try and find specific flows or work out who can do what with them. Not only do Solutions help you move your creations around but they also help you organise your work into logical features or story collections.
  • Always Think Scale – Sure your cloud flow works when there are only ten records in your table but what happens when you’re dealing with 10 million? This is where Filters and Tops on Lists, timeouts (and concurrency) have to come into play.
  • Keep It Simple Stupid – It’s an old adage but a good one. If you’re seven nests in then maybe it’s time to start thinking about breaking your cloud flow out into smaller, more discreet functions.
  • Comments – Don’t forget to comment your actions. Like many useful features Add a Comment it underneath that ellipsis in the top right.
  • Consider Performance / Readability – It’s a fine line and adding 10 strings together in a loop might be easy to understand but that might be taking 6 seconds whereas an expression utilising join is done in milliseconds. If you have a using waiting for the outcome of this Flow, go for speed and comment and document well.
Related

You might also be interested in

From our world to yours

Kerv Digital Events: Nonprofit Marketing Journey & Customer Insights Live Demo

From our world to yours

The Role of AI in Government: Driving Operational Costs Down Whilst Improving...

From our world to yours

Sustainability, Social Impact and Technology Procurement in the Transport Sector  

From our world to yours

The Kerv and Genesys Partnership goes from Strength to Strength

From our world to yours

How BPOs can automate with care

From our world to yours

Focusing on employee engagement and performance matters

From our world to yours

Compliance Cloud: Overview & demonstrations

From our world to yours

Life at Kerv as a People Partner

From our world to yours

Unveiling The Latest Advancements: Microsoft Dynamics 365 – Release Wave 2

From our world to yours

4 Steps To Building A Compliance Solution

From our world to yours

Kerv is officially one of the UK’s Best Workplaces in Tech!

From our world to yours

Supporting Supporters: How Nonprofits Can Plan For The Future

From our world to yours

GoodShape Raises the Bar for Member Experience, Call Quality, & Compliance

From our world to yours

Qualitas: How small businesses coming together can aid GP practices

From our world to yours

Capacity vs Capability

From our world to yours

CV Library: How strong leadership focused on IT can be a vital...

From our world to yours

Microsoft Teams Telephony

From our world to yours

Voxivo4Teams Cloud Voice Solution

From our world to yours

Microsoft Teams Rooms

From our world to yours

What is Azure Arc?

From our world to yours

Delivering a platform to underpin Fotech’s rapid growth plans

From our world to yours

What is Shadow IT?

From our world to yours

The Low Code/No Code Canvas

From our world to yours

How Buckinghamshire NHS Trust sped up their service

From our world to yours

Capitalise on the Cloud Opportunity

Have a question?

Leave your details and a member of the team will be in touch to help.

"*" indicates required fields

By pressing send, you agree to our Terms and Conditions and Privacy Policy.
This field is for validation purposes and should be left unchanged.