Forum Discussion
Auto-populate SharePoint columns with profile information
- Apr 30, 2022
AthabascanDave don't rely on templates, you can build a very simple flow from blank to do this. The overall flow looks like this and we'll look at the trigger and each of the 2 actions later:
In the SharePoint list there is a person column called Employee and the Title column where the employee's name or account name can be stored. I've also added single line of text columns for position, department and mobile phone number. Those last 3 are what will be auto-populated.
For the SharePoint form you can remove those 3 columns as you won't be entering that data manually. This will leave just the person column and the title column:
So a new item is created, the flow will run and the 3 other columns will be populated with the employee's info:
The flow has a SharePoint trigger of "When an item is created" and you select the site and the list:
Next, add an Office 365 Users "Get user profile (v2)" action and for the User (UPN) field, click in the field and select Employee Email from the dynamic content box that appears:
Finally, add a SharePoint "Update item" action. Again, select your site and list and in the ID field select ID from the when an item is created section of the dynamic content box.
Scroll down through the dynamic contents box and you'll see the employee's information is available to be selected from the Get user profile (v2) section of the dynamic content box:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
AthabascanDave don't rely on templates, you can build a very simple flow from blank to do this. The overall flow looks like this and we'll look at the trigger and each of the 2 actions later:
In the SharePoint list there is a person column called Employee and the Title column where the employee's name or account name can be stored. I've also added single line of text columns for position, department and mobile phone number. Those last 3 are what will be auto-populated.
For the SharePoint form you can remove those 3 columns as you won't be entering that data manually. This will leave just the person column and the title column:
So a new item is created, the flow will run and the 3 other columns will be populated with the employee's info:
The flow has a SharePoint trigger of "When an item is created" and you select the site and the list:
Next, add an Office 365 Users "Get user profile (v2)" action and for the User (UPN) field, click in the field and select Employee Email from the dynamic content box that appears:
Finally, add a SharePoint "Update item" action. Again, select your site and list and in the ID field select ID from the when an item is created section of the dynamic content box.
Scroll down through the dynamic contents box and you'll see the employee's information is available to be selected from the Get user profile (v2) section of the dynamic content box:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Preface that I am not an experienced user in Power Automate. I tried to follow your steps, but ran into an error.
The specified user Office of the Exec Vice Chancellor UNL could not be found.
clientRequestId: 96d61e56-3482-4c55-8fe3-5c5ab9dc327a
serviceRequestId: 96d61e56-3482-4c55-8fe3-5c5ab9dc327a
It pulled the correct department as "Office of the Exec Vice Chancellor UNL" is the right department for that user, but I received that error and the flow failed. My employee column is called Person. It is a person column. I want the user to input a name in the person column, then PA to update other profile information (like department).
Thank you!