I’m trying to convert the body of an email into a Word document (.docx) and upload it to SharePoint using Power Automate.
Currently, I have a flow set up that triggers when an email is received. It converts the email’s HTML content to plain text, but I’m running into issues when trying to create the Word document.
When I use the SharePoint "Create file" action and specify a .docx
extension, the file gets created successfully. However, when I try to open it in Word, I receive an error stating that the content is unreadable. I'm unsure how to properly format the text so that Word recognizes it correctly.
Additionally, I want to ensure that each generated file has a unique name to avoid conflicts. I would prefer to avoid using OneDrive for Business, as I don’t want files stored locally or tied to a specific user account. However, if OneDrive is the only solution, I could add an extra step to delete the file after processing.
How can I properly populate the email body into a Word document so that it opens without errors? Is there a way to do this directly in SharePoint without relying on OneDrive?
Any guidance would be greatly appreciated!