Problem Statement
To save people picker value as null or empty is always a tricky situation in SharePoint Online List dynamically. Let's see how it can be achieved when working with Power Automate.
Scenario
Here, we are going to sync the DevOps data i.e. Text, Choice & Identity column, into SharePoint Online List as Text, Choice & People Picker value.
Step 1. Request received when Azure DevOps data saved.
The previous article with the configuration steps of the request received is here.
- Request Received
- Parse the field into JSON
- Initialize the variable as a string
- Get User Profile action (Extract email id and pass)
replace(split(body('Parse_JSON')?['Custom.TechnicalInterviewBy'],'<')?[1],'>','')

Step 2. Set variable value as "-1"
If the user email id doesn't exist or came as a null value, Configure Run after "Fail" to set the variable as "-1" which will be treated as user ID.

Step 3. Check for User Email and Set User ID if it exists
Create Scope and Configure the Run after as "Skipped". It means the user email id exists and gets the user ID of that email address.
The scope has two defined actions.
| Site Address | https://m365x6151710.sharepoint.com |
| Method | GET |
| URI | _api/web/SiteUsers/getByEmail('@{outputs('Get_user_profile_(V2)')?['body/mail']}') |
Send an HTTP request to SharePoint to get the user ID.





Join the conversation! Your thoughts help the community grow.