Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to Select emails for people picker update in Power Automate

Posted on April 21, 2024June 30, 2024 by Tom

“I’m confused from all the quotes, apostrophes, brackets in the people picker update, what format must the emails follow in Power Automate?”


When you’re working with big SharePoint lists, the ‘Update item’ action might get a bit confusing. It shows you all the columns and asks you to put value in all the mandatory ones, even when you want to update only a single column. That’s when an HTTP request might be a better solution. One action, a few lines of code, and the column is updated. Unless it’s a people picker column where the format adds another level of complexity…

‘Select’ the user emails

I already explained the data format in a previous article, people picker update body might look e.g. as below.

Body:
{
    "formValues":[
	{
	    "FieldName": "Approvers",
	    "FieldValue": "[{'Key':'i:0#.f|membership|xxx@tomriha.com'}, {'Key':'i:0#.f|membership|yyy@tomriha.com'}, {'Key':'i:0#.f|membership|zzz@tomriha.com'}]"
	}
    ]
}

Each person is an object, they’re all in an array, and to make it even more interesting there’s a bunch of quotes. Normally you’d use the double quotes (“), but since it’s part of the JSON body, the double quotes are already taken. They define the whole body and if you used them in the list of users you’d “close it” too early.

But first things first, you need the users in the desired format. The easiest way to get them is via the ‘Select’ action. Put the ‘Key’ on the left side and the claims login on the right side.

If you have Claims available among the dynamic contents, you can use it directly…

…if not, add the claims string before the email address to make it a claims login.

emails update people picker Power Automate

That’s only the first part though as such array will contain the double quotes. And as mentioned above, you can’t keep them.

Replace the double quotes with apostrophes

Since you must differentiate what is the request body and what is the data in one of the properties, you must use different set of quotes. Double quotes for the body, the main JSON, apostrophes to format the column data.

However, here comes another complication – to replace the quotes you must use an expression, and expressions use apostrophes as separators. Similarly to the body problem before, an apostrophe can mean an end of a parameter in an expression.

To replace apostrophe in an expression you must use double apostrophes to represent the character. The expression below will take the double quotes and replace them with a single apostrophe.

replace(<value>,'"','''')

As the ‘Select’ action creates an array, add one middle step to convert into a string(…). You get the expression to use in the HTTP request to update the multiple people picker column, e.g.

replace(string(body('Select_-_get_approvers_claims_login')),'"','''')
emails update people picker Power Automate

That’s it, you selected the claims/emails and turned them into claims, replaced double quotes with apostrophes, and you can update the column.

Summary

I believe that updating SharePoint columns via HTTP requests is one of the key functionalities in a flow. Most of the columns are easy to update with a few lines of code, but people picker is quite challenging, especially when Power Automate gives you only emails. Yet the process is similar to other columns – you just need the data in a specific format – and it’s only the format that takes a few more steps in this situation.


πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

1 thought on “How to Select emails for people picker update in Power Automate”

  1. Pingback: From the Microsoft Power Platform blogs: Plugin action; People picker update; Automate survey invitations; FAQ web pages - Cloudproz

Leave a Reply Cancel reply

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

πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes