Replace text in a SharePoint File [Word document] using Power Automate
Hello
Any help will be appreciated!
I have an issue: I wanted to replace the text in a Word document present in the SharePoint document library. I was getting a file from the SharePoint document library. Get file returns the content in binary data type. I want the content to be in text format so that I can easily replace it. To convert the binary data output, I used Compose with the expression: @{base64ToString(body('Get_file_content')?['$content'])}.
Compose 1: @{replace(outputs('Compose'),' Invoice Number', 'Invoice ID')} then updating the file content of Update File with Compose 1 outputs. but it's not working. not replacing the text. Is there any other way to do it? Please suggest a solution for me.
How to do this? Is there any way to use the GRAPH API or REST API in Power Automate?
Thank you!