Converting Multi-Person Fields to Email Strings Using Power Automate

Posted by

Retrieving data effectively within SharePoint lists can sometimes present challenges, especially when dealing with complex data types such as multi-person fields. Fortunately, with the power of Power Automate, we can overcome these challenges. This blog explains how.

When Might You Need This?

  1. Automated Notifications: When you need to send automated notifications or alerts to multiple individuals involved in a process or project.
  2. Task Assignment: When assigning tasks or responsibilities to a team, and you want to notify all members involved.
  3. Reporting and Analysis: When extracting data from SharePoint lists for reporting or analysis purposes, and you need email addresses for further processing.
  4. Workflow Automation: When building automated workflows that involve sending emails or triggering actions based on SharePoint data.

The Challenge: Multi-Person Fields in SharePoint

SharePoint offers a convenient multi-person field type, allowing users to assign tasks, responsibilities, or ownership to multiple individuals within a list item. While this feature enhances collaboration, extracting and utilizing this data effectively can be tricky, particularly when it comes to obtaining a concise list of email addresses for communication purposes.

The Solution: Power Automate

Power Automate provides a robust set of tools for automating workflows and integrating data across various platforms, including SharePoint. By leveraging Power Automate, we can extract email addresses from multi-person fields and consolidate them into a single string, facilitating streamlined communication and automation processes.

Implementation Steps

1. Trigger

Choose an appropriate trigger, for this blog I am using the simplest trigger.

2. Initialize Array Variable

Create an array variable to store the extracted email addresses.

3. Get Item

Retrieve the item from the SharePoint list that contains the multi-person field. For this blog I am using Get item action but you can use either “Get Item” or “Get Items” depending on your specific requirements and the context of your workflow.

  1. Get Item: This action retrieves a single item from a SharePoint list based on a specified identifier (typically the item ID). It’s suitable when you’re dealing with individual items or need to perform actions on a specific item.
  2. Get Items: This action retrieves multiple items from a SharePoint list based on specified criteria (e.g., filter conditions). It’s suitable when you need to work with multiple items simultaneously or need to process a batch of items.

Which one is better depends on your workflow’s logic and requirements:

  • If you’re dealing with a specific item and its associated multi-person field, “Get Item” might be more appropriate.
  • If you need to process multiple items in the SharePoint list and extract email addresses from their multi-person fields, “Get Items” would be the better choice.

In many cases, you might find “Get Items” more versatile because it allows you to retrieve a batch of items based on specified conditions, providing more flexibility in processing multiple items within a single Flow. However, if your workflow specifically revolves around a single item, “Get Item” might be more straightforward and efficient.

4. Select

Use the “Select” action to extract email addresses from the multi-person field. Remember to toggle the setting to return just the Email address

6. Join

Concatenate the array of email addresses into a single string using the “Join” action.

This is the full flow

Here is the Output

Leave a Reply

Your email address will not be published. Required fields are marked *