I'm trying to create a flow that takes the updated name of an account and changes the name of an existing Sharepoint folder with the new Account name (i.e. "CompanyName_[Guid]" changes to "NewCompanyName_[Guid]")
This is my flow so far:

I list all subfolders under "/account" and for each subfolder I check if the displayName property contains the Guid of the account that was modified. If yes this means that a folder already exists, and I need to then update the name of that folder. This is the "Change folder name" task expanded:

When I try to run the flow, I get the following error:
"Invalid JSON. A token was not recognized in the JSON content"
I tried to register an Add-in in SharePoint, and then use the client id as the access token in the authorization header, but that made the flow run forever untill I canceled it.
I just want to know if what I'm doing is remotely correct...