V2Flow in connections

Have you tried renaming flows? What if these flows are called from an app in Power Apps?

Better together, flows and apps

As we all know using Power Apps in combinations with Power Automate to run flows is a real winner. You can call a Flow to do all the complicated stuff while you keep your code in Power Apps simple and easy to understand.

Yesterday however I came across a bit of strange behaviour.

I started by create version 1 of my Flow

Version 1 of the flow

Then I run my flow from a button

Version 1 of the flow run from Power Apps.

Renaming flows

Then I rename my flow to V2 Flow

Renaming flows, now we have version 2 of the flow

Even though I renamed the flow my flow will still run when I click the button. This is probably quite good as you might not want all your apps to break

To clean things up I then re-add my flow and now the code will show V2Flow.Run() instead of V1Flow.Run(). Ok So far so good.

Version 2 of the flow added to a button in Power Apps.

When I look at the connections everything seems to be fine.

An app calling version 2 of my flow

Now I’m exporting my app

Exporting the app

And I’m importing my app again

Importing the app

But as a I rename my flow the connection is showing up a bit weirdly. There seems to be a Display name and a run name for a flow.

Mismatch of flow versions in Power Apps

This is different behaviour for if you have imported the Powerapp or if you have just created a Powerapp.

So what does this mean?

Now that I’ve updated my Flow name the code looks like it is still running v2 of my flow where actually v3 is called. This will make the code potentially confusing. You can of course update all occurrences of the flows but this is quite a painful process if you end up with larger apps having many flows started from the app.

So what should we do?

Try to avoid changing flow names is the better approach.  Try to avoid flow names that have version numbers. And the same of course for names that are different between environments. I often see flows being names something like MyFlow_DEV_v21. Just call it MyFlow and keep track of your versions in a different way.

By Pieter Veenstra

Business Applications and Office Apps & Services Microsoft MVP working as a Microsoft Productivity Principal Consultant at HybrIT Services. You can contact me using contact@veenstra.me.uk.

One thought on “Renaming flows run from Power Apps”
  1. Having worked with most of the workflow solutions since Staffware was released in 1985, the lack of any proper versioning/publishing of flow definitions is staggering for an ‘Enterprise ready’ product. How difficult would it be to apply similar SharePoint checkin/out minor/major versioning functionality to the flow XML definition? The fact you can only ever work on the ‘live’ version is ridiculous, Save As is NOT the answer!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: