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

Posting an html table to a slack channel

I created a scheduled Flow for an out of office notification email and a Teams post that pulls from a SharePoint calendar for managers.  Some managers use Slack and want the notification posted to a Slack channel.  The issue is that the Flow creates an HTML table to display the output, which Slack doesn't like. 

 

Is there a way to convert the HTML table output to Markdown or a better way to present it Slack?  I tried the HTML to text action and it helped, but it's still not very reader friendly.

Annotation 2020-05-22 084617.png

 

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

I tried this, but I think I had a few errors in my writing it.  

 

I found that the simple solution was to just create the posts in an Apply to Each and not use the html table and try to convert it.  

 

In this case, the apply to each and creating the message with dynamic content worked.

View solution in original post

4 REPLIES 4
Highlighted
Super User II
Super User II

@jbitterolf 

Hey there.  I wonder if you can use a series of replace() functions to swap out all of the HTML stuff with the equivalent markdown?


Check out this similar thread.

 

Keep us posted.

-Ed

 

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Highlighted

@edgonzales

 

Would I use a compose action to pull up the Select action and then replace the HTML?  How would I apply the replace() to the data in the Select action without retrieving it first?

Highlighted

@jbitterolf 

Yep, exactly right.   After you create the HTML table, you could replace all of the HTML tags with the Replace() with something like this:  replace(<HTML Table Output>, '<th>','#') or something (I'm not great with either HTML or Markdown, just showing how replace() works.

 

Another option would be to send the HTML to an API to convert things before posting.  If you do a search for "HTML to Markdown API" you should get a few hits, and most of them have pretty good instructions on sending the HTTP call...if you want.

 

Keep us posted.

-Ed

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Highlighted

I tried this, but I think I had a few errors in my writing it.  

 

I found that the simple solution was to just create the posts in an Apply to Each and not use the html table and try to convert it.  

 

In this case, the apply to each and creating the message with dynamic content worked.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (8,216)