Hi all,
I've kind of hit a brick wall and I'm hoping someone can help.
Scenario: We send our customers an e-mail requesting some network information prior to installation, requesting they fill in some basic information. The content of the email/attachment varies depending on the model they are having.
The attachment part i've resolved fairly easily. The sharepoint list that contains the customer info has a calculted field called "attachment link" that dynamically creates the filepath for them to use.
I figured I'd use the same approach to the content of the email, but can't get it to work.
I have a file for each model with the template for the content held within it. Initially I tried inputting the dynamic content 'File Content' directly into the email, but that isn't given as an option, so I figured I'd run it through the 'Compose' action first to give me an output to work with.
This has worked, but the email generated looks like this:
I'm assuming it's taking all of the XML included in the file content, but I can't see or find an easy way to remove this, and retain the text and (preferably, but not essentially) the formatting as well.
Any hints in the right direction would be gratefully received!
You could also use the OneDrive action to convert a given word document to a pdf, then use parts of this template to either extract exact data values from the document or just get the entire file contents as a text replica:
Thanks both. I managed to find a workaround by saving my word documents as HTML files in the first instance. (They were being used as email templates).
I've checked out Muhimbi, which looks great, but would never be able to justify the costs of it to the higher ups! I'll take a look at encodian in the near future too.
@SimonSmith84 @CFernandes - The Encodian action also covers this... just change the output of the 'Convert Word' action from 'TXT' to 'HTML'
Hello @SimonSmith84
I am using the Muhimbi connector -
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
Hey @CFernandes - That looks perfect! Please can you provide the name of the connector? Can't see it when eyeballing steps etc. even with "convert document" in the search field.
Hey @SimonSmith84
Workaround with third party Connector.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
Yeah I read that article. My difficulty is the method he uses doesn' work for my particular setup, as my 'Get File Content Path' doesn't offer its output as dynamic content for filtering an array. It is as close as I've come to an answer though.
@Jay-Encodian - Hi Jay, thanks for this. I was hoping for a solution that allowed me to retain the formatting etc. If it comes to it, I can replace the .docx file with a .txt file anyway and then apply formatting in HTML I guess. I just wanted to try and do it with the word doc first to see if I could retain the formatting. This would allow other users to update the documentation and have the formatting carry over.
Hey @SimonSmith84
Its not that easy 🙂 as Power Automate returns the entire document with encoding\formatting.
You need to try something this - https://www.tachytelic.net/2021/05/power-automate-extract-text-from-word-docx-file/
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
Hey @SimonSmith84
You can extract the text from a Word document by converting the document to TXT format using the Encodian connectors 'Convert Word' action, example flow can be found here: https://www.encodian.com/blog/search-word-documents-with-microsoft-power-automate/
HTH
Jay
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional