Select Action in Power Automate
Select in Power Automate
The Select action in Power Automate is a powerful data transformation tool used to reshape arrays. It allows you to map or reformat data from one structure into another โ making it ideal for clean output formatting, preparing JSON for APIs, and simplifying later steps in your flow.
Whether you’re working with SharePoint lists, APIs, or Excel tables, mastering Select in Power Automate is key to advanced flow design.
๐ Table of Contents
- Introduction
- What Is the Select Action in Power Automate?
- Why Use Select in Power Automate?
- Real-World Use Cases
- How to Use the Select Action
- Select vs Other Actions (Join, Apply to Each)
- Examples of Select in Power Automate
- Best Practices
- Common Pitfalls
- Summary
๐ What Is the Select Action in Power Automate?
The Select action is part of the Data Operations connector in Power Automate. It:
- Takes an array as input
- Allows you to define a custom structure (key-value pairs)
- Outputs a transformed array
The Select action does not filter items โ it remaps them.
๐ค Why Use Select in Power Automate?
Use Select in Power Automate when you need to:
- Reshape array data
- Prepare data for JSON payloads
- Rename fields for clarity
- Flatten nested objects
- Remove unnecessary properties
- Build datasets for Excel, Outlook tables, or reports
It replaces the need for manual loops or Compose + Append strategies.
๐ผ Real-World Use Cases
Use Case | Description |
---|---|
SharePoint Cleanup | Convert SharePoint item arrays into simplified name-value pairs |
API Output Reformatting | Re-map complex response fields to match a different schema |
Email Tables | Shape arrays for HTML table generation in Outlook |
Power Apps Output | Return only essential data to Power Apps for display |
Data Migration | Rename fields and drop unnecessary data before saving to SQL or Excel |
๐ ๏ธ How to Use the Select Action
Step 1: Add Select
Go to New Step โ Data Operations โ Select
Step 2: Choose Your Array
Set the From field to your array (e.g., value from SharePoint Get Items
, or body('Parse_JSON')?['items']
)
Step 3: Define Mappings
Specify the fields and values you want in the output.
Example:
Key | Value |
---|---|
FullName | item()?['FirstName'] & ' ' & item()?['LastName'] |
item()?['Email'] |
This returns a cleaned-up array like:
[
{
"FullName": "John Smith",
"Email": "john@example.com"
}
]
๐ Select vs Other Actions
Action | Function |
---|---|
Select | Remaps data fields in arrays |
Join | Combines array items into a single string |
Apply to Each + Compose | Manual way of reshaping (less efficient) |
Select is the cleaner, faster way to reformat arrays.
๐ Examples of Select in Power Automate
๐น Example 1: Format SharePoint Items
You’re pulling data from SharePoint and want to return only specific fields.
Input:
[
{ "Title": "Task A", "Owner": "Alice", "Status": "Open" },
{ "Title": "Task B", "Owner": "Bob", "Status": "Done" }
]
Select Mapping:
TaskName
:item()?['Title']
AssignedTo
:item()?['Owner']
Output:
[
{ "TaskName": "Task A", "AssignedTo": "Alice" },
{ "TaskName": "Task B", "AssignedTo": "Bob" }
]
๐น Example 2: Create a Custom API Payload
You need to call an external API with the following JSON:
[
{
"id": "123",
"amount": 50
}
]
With Select, map fields from an incoming array and prepare it dynamically โ no loops needed.
โ Best Practices for Using Select in Power Automate
- โ Always validate input array to avoid null errors
- โ Use clear and consistent key names in output
- โ
Combine with
Parse JSON
for better type safety - โ
Use
item()
syntax oritem()?['field']
for field references - โ Test output with a Compose to ensure structure is correct
โ ๏ธ Common Pitfalls
Pitfall | Solution |
---|---|
Using Select on a non-array object | Use createArray() or fix the input |
Blank results | Confirm that fields exist in every item (item()?['field'] ) |
Mixing object and array types | Ensure the input is a clean array of objects |
Expressions not resolving | Use the Expression editor for complex values |
Expecting Select to filter | Use Filter Array instead for filtering logic |
๐งพ Summary: Mastering Select in Power Automate
The Select action in Power Automate is essential for anyone working with data transformation. It enables clean, structured, and performance-friendly flows by simplifying how you shape arrays.
Use Select in Power Automate to:
- Transform and clean data
- Reformat API responses
- Build tables or payloads
- Reduce clutter from large datasets