web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Remove HTML tags from ...
Power Automate
Answered

Remove HTML tags from CSV file created using Power Automate

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Everyone,

 

I am using Get items to retrieve information from a SharePoint list and then using Select statement I am creating the mapping for the necessary columns. In this Select statement there are 15 columns selected and the number of rows created are dynamic based on input parameters. 

 

Output of this select statement is being used to create CSV file, which is send out to user's email ID. The file contains values from different type of SharePoint columns, Text, Numerical, Multi-select, Single select, Plain text, Date field. But the problem is all mapped columns values are getting capture properly except the HTML column created as "  Rich text (Bold, italics, text alignment, hyperlinks)" in SharePoint list. This column contains the output as 

<div class="ExternalClassB"><a href=file link=c131b&amp;csf=1&amp;web=1&amp;e=EndGIR">Actual Text</a></div>

 

Can someone help me how I can remove the HTML tags from this file? 

 

AKB_2K_0-1660236410703.png

AKB_2K_1-1660236458264.png

 

 

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @Anonymous ,

    Power Automate has an action called 'HTML to Text', but you'd have to process all the rows in a loop to pre-process the texts, so the only solution I can think of is to switch the 'Multiple lines of text' column into 'Plain text'.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @tom_riha Thanks for your response. Unfortunately I can't change that column into Plain text as it feeds in HTML data from a PowerApps linked to same SharePoint list. Users feed in embedded hyperlinks, highlight/color specific text, etc. 

     

    I however tried to convert the HTML text entries using 'HTML to Text' action, but the loop doesn't work properly when I try to add that entry to Select action inside a 'Apply to each' and later add the values to 'Create CSV' function.

  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    That's the problem, you can't use 'HTML to Text' action together with 'Select'. Instead you'd need an array variable, an 'Apply to each', and inside the loop 'HTML to Text' and 'Append to array variable' the final object. No 'Select' as you can't preprocess any data when using select.

  • Verified answer
    eliotcole Profile Picture
    4,390 Moderator on at

    @Anonymous, I think there's a super simple solution to this, and if you don't own (or have permissions) ask the relevant party.

     

    Use a Helper Column

    1. Add a column to the list that is a multiple lined plain text column.

    2. Add a separate flow which runs on new/modified triggering only if that column has data.

      Which updates that column with a plain text version (using @tom_riha's HTML to text) of whatever is in that column.

    3. Then just pull the information from that column instead.

     

    You can ensure that the column doesn't appear on any views or forms easily enough (I'd not drill down into that here, but you can find out how) to ensure folks don't get confused.

     

    The other thing I'd ask is whether it *needs* to be rich text. Most folks should be able to use such fields without it.

     

    Finally, if this flow also triggers on updates to that list ... it's not an insurmountable thing. It just requires a little more work, perhaps a separate plainTextUpdated Time and Date field to qualify when/if things happen.

     

    * btw, it really helps if you include the whole thing in the original question

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Basically as PowerApps was my data feeder, I created a Plain text column in my SharePoint list and used PlainText function in PowerApps itself to convert the HTML text and push the data into this new column directly. Then I updated my Select operation in my original flow to pull the data from this Plain text SharePoint column. Creating a flow for any new/change was going crazy, as the flow was basically running all the time. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard