cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MVB1
Frequent Visitor

Create Flow to automatically save email as Text on Sharepoint

Hi All,

 

I was wondering if anyone has an idea how to create a Flow when a e-mail comes in with a certain subject, it will save the complete message to a sharepoint as a text file.

 

Basically i came up with this, but i'm having trouble to implement.

- Email comes in (this is a automated one with a set subject)

- When this is triggered, create a text file with the subject as filename and the body of the email as content.

- Save this new file to the Sharepoint

 

Don't know if anyone here can help out? I already have a Flow which does the same, but for attachments. Now i want to save the complete mail as tekst.

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi again

John Liu gave me the idea. He managed to create a text file by means of storing the text in a Compose action block.

https://twitter.com/johnnliu/status/1007041490642563074

 

So i did the same, you just need to use 'HTML to text' output as the 'Compose' imput. Haven't tested if you can use 'HTML' output directly, so maybe it can be even easier.

Flow_createTextFile.png

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

4 REPLIES 4
efialttes
Super User
Super User

Hi

THe usual approach to archive emails in sharepoint is by exporting them to .eml file or even store the body as HTML, as explained in this blog post.

If you need to store the body as text I would suggest to use action block 'HTML to text' using email body as its input.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



MVB1
Frequent Visitor

Hey Efialttes,

 

Thanks for the quick advice! That really helped a lot.

Perhaps you can help with the final step. I now have the text isolated and i've made a "Create a file" block to save it. 

only thing is that i can't seem to save it as a text file. Any ideas how to do this?

Hi again

John Liu gave me the idea. He managed to create a text file by means of storing the text in a Compose action block.

https://twitter.com/johnnliu/status/1007041490642563074

 

So i did the same, you just need to use 'HTML to text' output as the 'Compose' imput. Haven't tested if you can use 'HTML' output directly, so maybe it can be even easier.

Flow_createTextFile.png

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



MVB1
Frequent Visitor

Hi,

 

This was exactly what i was looking for!

 

- Trigger: email with a certain subject

- Compose: Take the body as input

- Create file to Sharepoint: File content is the output of compose and the file name is Email Subject (and add .txt after that to create a text file)

 

Thanks for helping out 🙂 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,996)