How to Convert Value to String in Power Automate?

Do you want to convert the number value to a string using Power Automate? In this Power Automate Tutorial, we will discuss how to convert a value to a string in Power Automate.

Here, we are going to cover the topics below:

  • How to convert the value to a string using the String() function in Power Automate
  • How to convert the value to a string using the Format Number action in Power Automate
  • How to convert the value to a string using formatNumber() function in Power Automate

Convert a value to a string using String() function in Power Automate

In this method, we will see how to convert a number to a string using the string() function in Power Automate.

1. In Power Automate flow, we will add a “Manually trigger a flow” action from “instant cloud flow“. We will add a compose action after adding this trigger to our flow. In that action, we will use any static value as an input. For example, here we will use a random number, i.e., 123

Power Automate convert value to string

2. Again, we will add another Compose action that will format the output of the compose(i.e. 54321) into a string by using an expression. Insert the below expression in the expression bar and click on Update.

string(outputs('Compose'))
Convert value to string Power Automate

3. Now, the flow is ready. So we need to just Save and test it. We can see the output is coming as “string“.

convert value to string in Power Automate

This is how to convert a number to a string using Power Automate Flow’s string() function.

Convert value to a string using Format Number action in Power Automate

Here, we will see how to convert the value to a string using the Format Number action in Power Automate.

For example, we have an integer 54321, and we will convert it into string ‘54321’ for this, we need to pass the string format, i.e., 0000, in the format action.

1. In Power Automate Cloud, create an Instant cloud flow and select Manually trigger a flow action.

convert number to string power automate

2. Next, click on the +New step -> select Format number action. Then provide the information below

  • Number: Provide the number you want to format
  • Format: Provide the format as 0000
convert number to string in power automate

Save and run the flow manually; the number is converted to a string.

format number to String on Power Automate

This is how to format numbers to strings using the Format Number action in Power Automate.

Convert the value to a string using formatNumber() function in Power Automate

Here, we will see how to convert the value to a string using the formatNumber() action in Power Automate.

For example, we have an integer 54321, and we will convert it into string ‘54321’ for this, we need to pass the string format, i.e., 0000, in the formatNumber().

1. In Power Automate Cloud, create an Instant cloud flow and select Manually trigger a flow action.

convert number to string power automate

2. Next, click on the +New step -> select Compose action. Then provide the below information:

  • Inputs: Provide the expression as ‘formatNumber(54321,’0000′)’
How to convert value  to string in power automate

3. Now run the flow manually, and you can see the given integer is converted to string in Power Automate.

How to convert value  to string power automate

This is how to convert the value to a string using formatNumber() in Power Automate.

Conclusion

In this Powe Automate tutorial, we saw how to convert the value to a string in Power Automate using the three ways below:

  • string() function
  • Format number flow action
  • formatNumber() function

You may also like:

>