Try to copy the template folder instead.
1. Copy Folder action in Sharepoint.
- Use "Copy with a new name" if folder is already there.
2. Use a Compose with the Copy action as input and remove any illegal special characters from the file path name
3. Get Folder Metadata
- Use the Path item from the Copy Folder action - outputs('Copy_Folder')?['body/path']
4. Send an HTTP request to SharePoint to change the name
Method: POST
URI: _api/web/GetFolderByServerRelativeUrl('@{replace(substring(outputs('Copy_Folder')?['body/Path'], 1, sub(length(outputs('Copy_Folder')?['body/Path']), 1)), ' ', '%20')}')/ListItemAllFields
Headers:
- Accept: application/json;odata=verbose
- If-Match: *
- X-HTTP-Method: MERGE
Body:
{
"Title": "@{variables('varDateTimeFormat')} - @{outputs('Compose')}",
"FileLeafRef": "@{variables('varDateTimeFormat')} - @{outputs('Compose')}"
}
This body will give you title like "03.03.2026 - Project name"