How to reverse a string in Power Automate

Hello everyone and welcome to my blog. In today’s blog I show a simple technique on how to reverse a string in Power Automate.

I have the following string – “1234567890“. I want to reverse the string in Power Automate. If you are looking to do the same thing in Power Apps, you can check my blog link here.

So let’s get started. The first step is to create a variable to hold my input string.

In the next I declare an array variable.

The next step is to populate this Array with the characters from input string. To do this I use the below construct. If you want an elaborate walkthrough on how to create an array of characters from input string, you can follow this blog link.

The next step and probably the most important one is to reverse the array. For this I have used the inbuilt reverse function. Using this function I will reverse the contents of the array.

The final step it to join the contents of the array to a string. To do this, I will use the inbuilt join function.

And that’s it. Now when I run the flow, I get the desired result.

That was quite easy I shall say. Looks like a lot of steps but all the steps are really simple.

Hope you liked the post. If this post has helped, you can buy me a coffee.

For similar interesting topics on Microsoft.NET and Power platform, you can subscribe to my blog using the Subscribe option on the right pane.

Debajit Dutta
Business Solutions MVP