Dear Jelmer,
You may use API to get the previous of the item value and then update the folder by the folder id to move forward.
Get all versions of the EmployeeName values.
_api/web/lists/GetByTitle('ListforEmployee')/items(@{triggerOutputs()?['body/ID']})/Versions?$select=EmployeeName
Compose to get the previous value of EmployeeName.
outputs('Send_an_HTTP_request_to_SharePoint_')?['body']?['d']?['results'][1]?['EmployeeName']
Find the folder id of the folder which needs to be updated.
items('Apply_to_each')?['ID']
Update the folder name by _api/web/lists/GetbyTitle('Library for Emplyee')/items(@{outputs('Compose_3')})/validateUpdateListItem with the method POST.
Body:
{
"formValues": [
{
"FieldName": "FileLeafRef",
"FieldValue": "@{outputs('Compose\_2')}"
}
]
}
List:
Library:
Flow Details:
Thank you for your effort and time.
Sincerely
Cliff | Microsoft Community Moderator