Convert an Array to comma separated string in Power Automate

Many times when we have an Array in Power Automate and we want to make it comma separated string in such cases we use loop to iterate each element in an array and append comma, we can avoid this loop and create desired string by using Join function available in Power Automate. My blog will guide you how you can achieve the same.

Note: I am using hard code array in my blog, but you can use dynamic array as well

Steps:
  1. Initialize a variable of type array with ['a', 'b', 'c', 'd', 'e'] as its element.

  2. Add a new Compose step and use join function (join (variables('Array 1'),',')) to make array a comma separated string as shown below.

  3. Join function accepts 2 parameters, first parameter as Array in my case its Array 1 (variable) and second parameter as delimiter in my case I passed ‘,’ as we want to make comma separated string but you can use any delimiter and create your own string.
  4. Now, save and execute the flow and check if it works.
  5. Below are the 2 screenshots of executed flow.

    Hope this helps!
        Any questions or concern, please do not hesitate to ask in comment section below and I would love to answer the same

Comments

Popular posts from this blog

Send note's PDF as email attachment using Power Automate

Make D365 CRM Entity as Read only