Change URL in dozens of Flows - any best-practice advice for next time?

I apparently have made close to 100 (Power Automate) flows over the last 3 years or so that ping Epicor.

Well, now we are planning to switch the URL that they connect to, to separate the traffic. Just the slug part (the domain.com/endpoint part) will change; obviously the other stuff is standard Kinetic-REST syntax.

I don’t expect this to be quick, and that’s fine. I’ll live.

But my question is, how could I have done this better if I had known that this would happen?

Like, in Postman I can set an environment variable and then it’s easy to change everything. Any analog in the “Power Platform” world?

1 Like

Not sure about PowerAutomate, but in Logic Apps, there are parameters that can be used to build your URL. Maybe you can steal something from there? If nothing, it would be cool to have one for production, test, pilot, etc.

1 Like

You and that Logic Apps.

I have not tried it yet. I saw that it’s a separate subscription for it (over and above the Power Automate licensing), so I lost my spine at that point.

But I guess you are saying there may be a similar idea in the Power Automate world?

1 Like

OK, so even there, it’s not global, right?

I’m reading over this and it looks like it is still scoped inside of a workflow.

So, it depends. :stuck_out_tongue_winking_eye:. There is a concept of an ARM template, which is an ugly Json version of the resource. In this case, if you put all of your workflows in one ARM file, you can use a template variable that gets assigned to the various parmeters in each workflow.

Also, the article mentions this: Edit runtime and environment settings for Standard logic apps - Azure Logic Apps | Microsoft Learn

3 Likes

Wow, not your fault at all, but that is one complicated solution to a simple ask.

I have no doubt that there are phenomenal reasons for it, but way to make a simple thing hard, Microsoft.

Another, much simpler option is to write an Azure Function that accepts an environment string and returns the server. That would work with an http widget in PowerAutomate too.

1 Like

We use a config file
Step 1 read file

File is hosted on one of our servers and we use a gateway to pull it in

We did this with automation studio too

The file is a just a Jason file with config info like URL’s etc

3 Likes

for some reason when I read your post I thought of this…

image

2 Likes

Another idea I had was to just make some simple “SharePoint List” with the data and read it into my Flow.

That’s not as code-ish as both of your ideas, but I imagine it would work. It just seemed a little arbitrary. What if the list gets deleted, etc.

Like “Collections” in Postman?

<rant>
So why doesn’t Power Automate have that natively?

It seems like it needs to embrace that concept of collections. Like I said, I have roughly 100 Flows just scrambled into one big puddle. I rely on naming conventions in hopes of finding anything. I would love to group them somehow and then add parameters variables to those collections.
</rant>

At what point did I have to start thinking like a software developer?

1 Like

I saw a few people suggesting SharePoint lists online and while I think it’s a very viable idea I personally prefer Jose’s approach. But that could just be me and my frustrations with SharePoint as a whole.

Whether it’s a SharePoint list or a simple file it will definitely just be a band-aid fix for what I agree should be a basic feature in Power Automate. I have nowhere near as many flows as you and I agree that it would still be a pain to update them all. Additionally, using any proposed solution adds another flow block or two to grab and maybe parse the result.

If they introduced “environment variables” that were always available in the suggested dropdown options it would eliminate the need for blocks in every single flow that you have utilizing this solution. It should also pull the value quicker than going out to SharePoint or your server’s file system. It’s one of many wishes I have for Power Automate, a great tool with many pain points.

I haven’t looked into them too much, but Power Automate does have the concept of “Solutions” which seems to allow you to group flows based on your project or type of flows.

1 Like

Oooooooooo.

This seems like it has all the lingo (like environment variables).

It is, however, considered part of Dataverse, apparently.

So I’ll have to read up on that. Thank you.

When you started coding? :person_shrugging: :rofl:

ARM templates (which can also be described by BICEP), are the actual definitions used by Azure to change the infrastructure. They describe resources and services and Azure implements them from the JSON ARM file (ARM = Azure Resource Manager).

The reason I proposed an https callable function was to make it easy for PowerAutomate to get it. If I serve a file from a local web server, I’ll have to expose that call to PowerAutomate some way.

Geeks and puns :man_facepalming:

Reminds me of WIMPs and MACHOs.

This is for Power BI Desktop, but I wonder if this might work for you in PowerAutomate? :thinking: