Showing results for 
Search instead for 
Did you mean: 

Publish HTML Files or TXT files from Microsoft Teams channel tab Forms via Flow

One of the most common desires for a workflow is the ability to create documentation from a form. There are endless business processes for this kind of workflow, and such a workflow can easily integrate as part of a larger business process.


Ideas for modification


This Flow could be modified conditionally to have certain responses direct files to be added as attachments to List Items, to be sorted into different document libraries, or even be sent to different users via emails, or have notifications sent to those users all based on the dynamic data generated by form responses. Further notifications, emails, approvals and other workflow options could easily be conditionally added to these steps or as separate workflows based on business needs.


The Flow in question


With only a few short steps, it is possible to use flow to create txt or html files which can be easily formatted and viewed in SharePoint.


The first thing I'm going to do is create my Form in Teams so that people can easily access the point for data entry from a labeled tab. I simply click the "+" at the top of the Teams channel to create a new Tab, and then name and create my Microsoft Form.

Image 36.png


 Image 001.png

The form as it exists in Teams.



 Image 002.png

(the form in its entirety for reference)

Once I have my entry Form, I can go ahead and hop on over to Flow, and create a new Flow from scratch.


In order to use the data I'm pulling from the Form, I need to get the response data for my later steps, so this will be the first step I take in setting up the Flow.

 Image 003.png


Great! Now I have lots of dynamic data to play with.


Next, I'm going to use the Flow option to create a file. When I do this, I'm going to use a combination of HTML and the dynamic Forms fill data to create my document.


All I need to do to make the file an HTML file is add the ".html" extension to the end of the file. If I prefer to make this a txt document, I simply can add the ".txt" extension, and type normally in the "file content" section as you would in any text editor.


For this, I'm going to make an HTML document; I've created a "Customer Records" Document Library under the team to store this information. This way it can easily be viewed in SharePoint or connected to the Team. As we may be generating tons of records, it may not be best to have them all in the Folder corresponding to the Channel name  for them to appear in the "Files" tab of the Team in question.



 Image 004.png


My HTML is nothing fancy- here's a quick reference for those unfamiliar:


<html> be sure and add the </html> at the end of the document.

<div align="center"> = alignment- don't forget to add your </div> at the end of the section.




<p>New Paragraph</p>

<br>New Line</br>



Unfortunately, inside of SharePoint, you cannot reference images (boy did I play with that and try to get it to work 1,000 different ways!). You could still add it so that people will see the image if they download and view the HTML document in a browser.


The HTML for this is <img src="IMAGE URL">


 Image 005.png

Ok, so now I've built in my HTML, and added my Dynamic Content where appropriate. Be sure to add some dynamic content in the name to keep the record names unique (I usually add the date of submission for this).


Now you're ready to allow your users to create HTML (or txt) records via the form!


And success!


Image 009.png


HTML files will show up and be easily visible in SharePoint (you can even add a button and edit HTML files, though I don't think I'd necessarily add this customi...). The same is true for TXT files.


Unfortunately the HTML files are not quite as pretty in Teams at this time, and will show  the code and line numbers. The txt file view will also show the line numbers, and are not quite as visibly appealing, but are still effective for maintain a record from a form entry.


Text in Teams:

Image 008.png



HTML in Teams:

 Image 007.png



There are several PowerShell scripts that will allow you to convert .txt and .html documents to many other formats if needed (I'd recommend PDF or DOCX). This could also be added to the Flow above as part of the automated process, depending on the script you choose.


Thanks for reading!


My next post will focus on how to automatically publish a more appealing webpage to Azure Blob Storage via a very similar process!

Meet Our Blog Authors
  • Working daily with Microsoft Cloud to deliver the needs of my company, my customers and various Microsoft communities and forums. | Office 365 | Flow | PowerShell | PowerApps | SharePoint |
  • Co-founder of, Office 365 and SharePoint expert. Passionate about design and development of easy to use, convenient and flexible products.
  • Microsoft Business Apps MVP. Owner of ThriveFast, an Office 365 consulting company.
  • 7x Microsoft Business Solutions MVP (CRM)
  • Solution Architect with Slalom, and organizer of the Boston Office 365 User Group, and long term SharePoint/Office 365 veteren. Find more at Follow @DavidLozzi
  • I'm keen in MS technologies, SharePoint, Office 365 and development for them
  • Daniel is a Business Productivity Consultant & Microsoft Business Solutions MVP who is very enthusiastic about all things Office 365, Microsoft Flow, PowerApps, Azure & SharePoint (Online). Since the preview, Daniel has been working with Microsoft Flow and later on with Microsoft PowerApps. That led to him being awarded an MVP Award for Business Solutions. He loves to blog, present and evangelize about improving productivity in the modern workspace with these amazing tools!
  • Michelle is an Office 365 solution architect in Twin Cities, MN. She has been delivering business collaboration solutions for years with her focus on SharePoint and Office 365. Michelle is a recent board member of the Minnesota Office 365 User Group and has been a member of the SharePoint community since 2009. She is a frequent speaker at MNSPUG and SharePoint Saturday and co-chaired the Legal SharePoint User Group for 4 years. Her most frequent projects have involved rolling out a large deployment of Office 365, SharePoint Online intranet, build of a "CHAMPS" Office 365 user adoption program and most recently, SharePoint On-Premise to Online Migration. Michelle is very excited about cloud technology as it is shifting her IT Pro focus to collaboration strategy and technical adoption.
  • I'm a Microsoft Office Servers and Services MVP with a special interest in SharePoint, Office 365, Microsoft Flow, Microsoft Teams and PowerApps. I work at Triad Group Plc (