Hi,
You can use Send an HTTP request to SharePoint like the example below.
To achieve this follow the steps below.
1. Get the SharePoint Site URL where the file is located
2. Get the Document Library ID where the file is located
2.1 You can get the Document library id by going to your site content, clicking on the document library ellipses, and select settings, you should be able to see the id in the URL like the image below.
3. Get the List Item Entity Type Full Name of the Document Library
3.1 You can get this by using this Rest API
3.3 Search for ListItemEntityTypeFullName like the image below
4. Get the ID of the file you want to change the name
Now it's time to build the action parameters using the data the information that we previously gathered.
Site Address: VALUE FROM STEP 1
Method: POST
Uri: /_api/web/lists/getbyId('VALUE FROM STEP 2')/items(VALUE FROM STEP 4)
Header: Content-Type = application/json;odata=verbose
IF-MATCH = *
X-HTTP-METHOD = MERGE
Body: {'__metadata': {'type' : 'VALUE FROM STEP 3'
},'FileLeafRef': 'NEW FILE NAME AND IT'S FILE EXTENSION' }
IMPORTANT: Don't miss a single quote!!
Happy Power Automating :)