When working in Power Automate, you often need to manipulate data to meet your requirements, and strings are no exception. Have you ever had a scenario where you have a long string of values but must treat them as individual items?
Recently, I was working with a client, and I needed to create an array from a string. I found that we can create an array from a string using different functions, such as array(), createArray(), and split() functions.
In this tutorial, I will show you how to create an array from a string using Power Automate using these above functions.
Create an Array From a String Using Power Automate
Suppose you have a string containing email addresses separated by commas (e.g., [email protected], [email protected], [email protected]). You need to split this string into an array to loop through each email address and send a personalized message.
Create an Array From a String Using array() Function in Power Automate
In Power Automate, Array() creates or works with a list of values. Think of an array as a list of items grouped, such as numbers, names, or objects.
Syntax:
array(item1, item2, item3, ...)Here, we will see how I create an array from a string with the help of the array() function.
1. In the Power Automate, click the Instant Cloud flow, enter the Flow name, and choose the trigger flow (i.e., manually trigger a flow).

2. Add an “Initialize variable” action, provide a name for the variable, set the type to “String,” and enter the following value in the “Value” field:
[email protected], [email protected], [email protected], [email protected], [email protected]
3. Next, add compose action and provide the below expression:
array(variables('varEamil'))
Now, click on save and run the flow manually. After the flow runs successfully, click the compose action to see the Output section.

Create an Array From a String Using createArray() Function in Power Automate
The Power Automate createArray() function creates an array (a collection of items, like a list) from individual values. Think of it as a way to group multiple things in one place so you can work with them as a single collection.
The syntax for the createArray() function in Power Automate is:
createArray(value1, value2, value3, ...)Suppose you manage a Power Apps application and must send individual notifications to a predefined list of users whenever a specific event occurs (e.g., when a new record is added to a SharePoint list). Instead of maintaining a separate list, you can use Power Automate’s createArray() function to define these users directly.
This is the SharePoint I used for this example:

Now follow the below steps:
1. Create an automated cloud flow. Give the flow name and select the trigger When an item is created. Also, provide the Site Address and List Name.

2. Add a Compose action to create an array of email addresses (users to notify).
createArray('[email protected]', '[email protected]', '[email protected]')
3. Add an Apply to Each action to process each user in the array.
- Input: Use the output of the Compose action as the input to the loop.

4. Inside the loop, add the Send an Email (V2) action to send a notification to each user and provide below parameters:
- To: Use the dynamic content Current item from the Apply to Each action.
- Subject:
New Support Request Added - Body: Include details from the SharePoint list, such as:
A new support request has been added:
Title: @{triggerBody()?['Title']}
Description: @{triggerBody()?['Description']}
Priority: @{triggerBody()?['Priority/Value']}
Now, it’s time to save the flow. Click on Test -> Select Manually. Add an item to the SharePoint list.

After the flow runs successfully, people get notified about the new support request.

Create an Array From a String Using split() Function in Power Automate
In Power Automate, the split() function divides a text string into smaller pieces based on a specific separator (like a comma, space, or any character). The result is a list (array) of the individual parts.
The syntax for the split() function in Power Automate is:
split(text, separator)- text: The string of text you want to split.
- separator: The character or string used to split the text. This can be a comma, space, or any other delimiter.
Suppose you have a string of employee names separated by commas (e.g., John Doe, Jane Smith, Robert Brown), and you want to split this string into an array.
1. Create an Instant Cloud flow and choose the trigger flow (i.e., manually trigger a flow). Then, an Initialize Variable action will be added to store the string of employee names.
- Name: EmployeeNames
- Type: String
- Value: John Doe, Jane Smith, Robert Brown

2. Add a Compose action to split the string into an array.
split(variables('EmployeeNames'), ',')
Now, click on save and run the flow manually. After the flow runs successfully, click the compose action to see the Output section.

Conclusion
In this tutorial, I explained how to create an array from a string in Power Automate using three different functions: array(), createArray(), and split(). Each function allows you to manipulate a text string and convert it into an array, enabling you to process individual items, like email addresses or names, more efficiently within a flow. I showed how to use these functions in practical scenarios, such as sending notifications to users or splitting employee names from a string.
Also, we cover below examples:
- Reverse an Array in Power Automate
- Power Automate Remove Item from Array
- Various Ways to Sort Arrays in Power Automate
- Check If an array Contains a Value using Power Automate

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.