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 / Email body to Sharepoi...
Power Automate
Answered

Email body to Sharepoint List columns (html_to_text)

(0) ShareShare
ReportReport
Posted on by 44

Hi,

We have a new website which uses a couple of WordPress Forms rather than MS Forms which is causing a bit of a problem.  Rather than replace the whole thing with an MS Form (which doesn't view correctly on a mobile from my experience) I was attempting to pull the form entries into a Sharepoint List. 

 

I have it set up so that if somebody fills the form in I will receive an email like this

 

PowerPlatformEmail.png

I have built a flow to convert the emails from html to text and then I watched a YouTube video that suggested using variables to create breakpoints between each question.  I've tried this with name but I'm not having much success.  I'm way out of my depth when it comes to understanding expressions.

 

I do understand that I should end up with a messagebody variable that I can drop into the name column of my Sharepoint list but I'm just not getting it to either stop before the Email or to start after "name".

Any help appreciated!

Categories:
I have the same question (0)
  • Paulie78 Profile Picture
    8,424 Moderator on at

    I know I am not answering your actual question (and perhaps I should just do that). But what form system are you using in Wordpress (looks like WP-Form?). I've done integrations using both WP-Form and Gravity forms which instead of parsing the email use the HTTP connector instead. By using this method the form results are submitted as JSON, so you can get to the values directly. Makes life a bit easier.

     

    Having said that, it would also be possible to parse your email above.

  • Hibee Chris Profile Picture
    44 on at

    Hi Paulie, thanks for the response!  It is indeed WP-Form but that's as much as I understand your post!  

    Something like this which I've pulled from a YouTube video?  I'm clueless how I'd use this step to work with the form results unfortunately.

    HTTP.png

  • Paulie78 Profile Picture
    8,424 Moderator on at

    Kinda like that:

    https://wpforms.com/addons/webhooks-addon/

    I think you have inspired me to make a WP-Forms -> Microsoft Power Automate video. My weekend plans are so much better now 🤣

  • Hibee Chris Profile Picture
    44 on at

    Ah, I was getting excited about and had a follow up question straight away but when I went in to look I see that we're not on WP Forms Elite, think we're on the free version.  We don't have Zapier either hence me digging deeper into PowerAutomate than I'm familiar with.

    If you're serious about creating such a video then I'd definitely like to see it!  More than happy to go over the finer points of my struggle should it help shape it.

    My IT contractors said it'd take them a few hours to put together which I can't really justify at the moment as the form is only averaging a couple of submissions a day so it's easy enough to manually manage.  But I feel like I'm pretty close so would like to get it done for my own knowledge and sanity 😁


  • Paulie78 Profile Picture
    8,424 Moderator on at

    Please share your struggle, be good to get the feedback before building the video. Perhaps an even better idea is that you move up to WP-Forms Pro and we build the form together and make a video out of that. I'm licensed for up to 20 sites and have only used 3, so you could perhaps use one of my licenses (but they do have a sale on at the moment).

     

    Anyway - for now. Just post the HTML content received in your flow from an example form submission (before you convert it to text). Should be relatively straightforward to extract the values. 

     

    Perhaps an even better idea. If you export your WP-Form definition:

    WP-Forms.png 

    I can import it into my WP-Forms setup and then just try it out 😁

  • Hibee Chris Profile Picture
    44 on at

    I can't see that in the WP Forms.  I work for quite a small charity so I'd have to make a case for paying for the WP Forms which I don't really have with the number's we're currently receiving.  Hoping it steps up and I can get the new features to play about with!

     

    This is the html code that is fed into the html to text step.

    <p><html dir="ltr"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta content="text/html; charset=utf-8"><meta content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><style type="text/css">
    <!--
    p
    	{margin:10px 0;
    	padding:0}
    table
    	{border-collapse:collapse}
    h1, h2, h3, h4, h5, h6
    	{display:block;
    	margin:0;
    	padding:0}
    img, a img
    	{border:0;
    	height:auto;
    	outline:none;
    	text-decoration:none}
    body, #bodyTable, #bodyCell
    	{height:100%;
    	margin:0;
    	padding:0;
    	width:100%}
    #outlook a
    	{padding:0}
    img
    	{}
    table
    	{}
    .ReadMsgBody
    	{width:100%}
    .ExternalClass
    	{width:100%}
    p, a, li, td, blockquote
    	{}
    p, a, li, td, body, table, blockquote
    	{}
    .ExternalClass, .ExternalClass p, .ExternalClass td, .ExternalClass div, .ExternalClass span, .ExternalClass font
    	{line-height:100%}
    a[x-apple-data-detectors]
    	{color:inherit!important;
    	text-decoration:none!important;
    	font-size:inherit!important;
    	font-family:inherit!important;
    	font-weight:inherit!important;
    	line-height:inherit!important}
    #bodyCell
    	{padding:50px 50px}
    .templateContainer
    	{max-width:600px!important;
    	border:0}
    a.mcnButton
    	{display:block}
    .mcnTextContent
    	{word-break:break-word}
    .mcnTextContent img
    	{height:auto!important}
    .mcnDividerBlock
    	{table-layout:fixed!important}
    body, #bodyTable
    	{background-color:#e9eaec}
    h1
    	{color:#202020;
    	font-family:'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;
    	font-size:26px;
    	font-style:normal;
    	font-weight:bold;
    	line-height:125%;
    	letter-spacing:normal}
    h2
    	{color:#202020;
    	font-family:'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;
    	font-size:22px;
    	font-style:normal;
    	font-weight:bold;
    	line-height:125%;
    	letter-spacing:normal}
    h3
    	{color:#202020;
    	font-family:'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;
    	font-size:20px;
    	font-style:normal;
    	font-weight:bold;
    	line-height:125%;
    	letter-spacing:normal}
    h4
    	{color:#202020;
    	font-family:'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;
    	font-size:18px;
    	font-style:normal;
    	font-weight:bold;
    	line-height:125%;
    	letter-spacing:normal}
    #templateHeader
    	{border-top:0;
    	border-bottom:0;
    	padding-top:0;
    	padding-bottom:20px;
    	text-align:center}
    #templateBody
    	{background-color:#FFFFFF;
    	border-top:0;
    	border:1px solid #c1c1c1;
    	padding-top:0;
    	padding-bottom:0px}
    #templateBody .mcnTextContent, #templateBody .mcnTextContent p
    	{color:#555555;
    	font-family:'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;
    	font-size:14px;
    	line-height:150%}
    #templateBody .mcnTextContent a, #templateBody .mcnTextContent p a
    	{color:#ff7f50;
    	font-weight:normal;
    	text-decoration:underline}
    #templateFooter
    	{background-color:#e9eaec;
    	border-top:0;
    	border-bottom:0;
    	padding-top:12px;
    	padding-bottom:12px}
    #templateFooter .mcnTextContent, #templateFooter .mcnTextContent p
    	{color:#cccccc;
    	font-family:'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;
    	font-size:12px;
    	line-height:150%;
    	text-align:center}
    #templateFooter .mcnTextContent a, #templateFooter .mcnTextContent p a
    	{color:#cccccc;
    	font-weight:normal;
    	text-decoration:underline}
    @media only screen and (min-width:768px){
    .templateContainer
    	{width:600px!important}
    
    	}
    @media only screen and (max-width: 480px){
    body, table, td, p, a, li, blockquote
    	{}
    
    	}
    @media only screen and (max-width: 480px){
    body
    	{width:100%!important;
    	min-width:100%!important}
    
    	}
    @media only screen and (max-width: 680px){
    #bodyCell
    	{padding:20px 20px!important}
    
    	}
    @media only screen and (max-width: 480px){
    .mcnTextContentContainer
    	{max-width:100%!important;
    	width:100%!important}
    
    	}
    -->
    </style></head><body style="height:100%; margin:0; padding:0; width:100%; background-color:#e9eaec"><center><table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable" style="border-collapse:collapse; height:100%; margin:0; padding:0; width:100%; background-color:#e9eaec"><tbody><tr><td align="center" valign="top" id="bodyCell" style="height:100%; margin:0; padding:50px 50px; width:100%"><table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer" style="border-collapse:collapse; border:0; max-width:600px!important"><tbody><tr><td valign="top" id="templateBody" style="background-color:#FFFFFF; border-top:0; border:1px solid #c1c1c1; padding-top:0; padding-bottom:0px"><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextBlock" style="min-width:100%; border-collapse:collapse"><tbody class="mcnTextBlockOuter"><tr><td valign="top" class="mcnTextBlockInner" style=""><table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextContentContainer" style="min-width:100%; border-collapse:collapse"><tbody><tr><td valign="top" class="mcnTextContent" style="padding-top:30px; padding-right:30px; padding-bottom:30px; padding-left:30px"><table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="display:block; min-width:100%; border-collapse:collapse; width:100%"><tbody><tr><td style="color:#333333; padding-top:20px; padding-bottom:3px"><strong>Name</strong></td></tr><tr><td style="color:#555555; padding-top:3px; padding-bottom:20px">Hi Power Platform</td></tr></tbody></table><table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-top:1px solid #dddddd; display:block; min-width:100%; border-collapse:collapse; width:100%"><tbody><tr><td style="color:#333333; padding-top:20px; padding-bottom:3px"><strong>Email</strong></td></tr><tr><td style="color:#555555; padding-top:3px; padding-bottom:20px"><a href="mailto:testing@email.com">testing@email.com</a></td></tr></tbody></table><table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-top:1px solid #dddddd; display:block; min-width:100%; border-collapse:collapse; width:100%"><tbody><tr><td style="color:#333333; padding-top:20px; padding-bottom:3px"><strong>Who are you?</strong></td></tr><tr><td style="color:#555555; padding-top:3px; padding-bottom:20px">Professional</td></tr></tbody></table><table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-top:1px solid #dddddd; display:block; min-width:100%; border-collapse:collapse; width:100%"><tbody><tr><td style="color:#333333; padding-top:20px; padding-bottom:3px"><strong>Where are you based?</strong></td></tr><tr><td style="color:#555555; padding-top:3px; padding-bottom:20px">Comhairle nan Eilean Siar (Western Isles)</td></tr></tbody></table><table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-top:1px solid #dddddd; display:block; min-width:100%; border-collapse:collapse; width:100%"><tbody><tr><td style="color:#333333; padding-top:20px; padding-bottom:3px"><strong>Do you want to keep up to date with what's going on at Salvesen Mindroom Centre?</strong></td></tr><tr><td style="color:#555555; padding-top:3px; padding-bottom:20px">Not just now, thanks</td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td valign="top" id="templateFooter" style="background-color:#e9eaec; border-top:0; border-bottom:0; padding-top:12px; padding-bottom:12px"><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextBlock" style="min-width:100%; border-collapse:collapse"><tbody class="mcnTextBlockOuter"><tr><td valign="top" class="mcnTextBlockInner" style=""><table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextContentContainer" style="min-width:100%; border-collapse:collapse"><tbody><tr><td valign="top" class="mcnTextContent" style="padding-top:9px; padding-right:18px; padding-bottom:9px; padding-left:18px; word-break:break-word; color:#aaa; font-family:Helvetica; font-size:12px; line-height:150%; text-align:center">Sent from <a href="https://www.mindroom.org" style="color:#bbbbbb">Salvesen Mindroom Centre</a> </td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></center></body></html></p>

     

     And this is what it's come up with in text

     

    NameHi Power PlatformEmailtesting@email.comWho are you?ProfessionalWhere are you
    based?Comhairle nan Eilean Siar (Western Isles)Do you want to keep up to date
    with what's going on at Salvesen Mindroom Centre?Not just now, thanksSent from
    Salvesen Mindroom Centre [https://www.mindroom.org]

     

    In my first attempt at this I wasn't using the admin account and had the email forwarded on to me.  When I did that the text was that it gave me was laid out better with spaces between the field titles and the submitted content. 

  • Hibee Chris Profile Picture
    44 on at

    Missed hitting reply there.  What is your YouTube channel?  Would imagine there's more things I could do with learning on there. 

  • Paulie78 Profile Picture
    8,424 Moderator on at

    exportForm.gif

  • Hibee Chris Profile Picture
    44 on at

    Got it, thanks.

     

    This is the content of the JSON file but I've removed from the end another email that's automated and not part of this. The form is here on the site and we will be adapting it a little bit for instance the wording of the sign up opt in.  https://www.mindroom.org/resources/future-me-workbook/future-me-digital-form/

     

    Thanks!

     

    [{"id":"2858","field_id":9,"fields":{"0":{"id":"0","type":"name","label":"Name","format":"first-last","description":"","required":"1","size":"small","simple_placeholder":"","simple_default":"","first_placeholder":"","first_default":"","middle_placeholder":"","middle_default":"","last_placeholder":"","last_default":"","css":"wpforms-one-half wpforms-first wpforms-one-third wpforms-first wpforms-one-third wpforms-first"},"1":{"id":"1","type":"email","label":"Email","description":"","required":"1","size":"small","placeholder":"","confirmation_placeholder":"","default_value":"","css":"wpforms-one-third","filter_type":"","allowlist":"","denylist":""},"2":{"id":"2","type":"radio","label":"Who are you?","choices":{"1":{"label":"Parent \/ Carer","value":"","image":""},"2":{"label":"Young person","value":"","image":""},"3":{"label":"Professional","value":"","image":""},"4":{"label":"Other","value":"","image":""}},"description":"Please check the option that describes you.","required":"1","choices_images_style":"modern","input_columns":"2","css":"wpforms-one-third wpforms-first wpforms-one-third","dynamic_choices":""},"8":{"id":"8","type":"select","label":"Where are you based?","choices":{"41":{"label":"Aberdeen City","value":"","image":""},"5":{"label":"Aberdeenshire","value":"","image":""},"6":{"label":"Angus","value":"","image":""},"7":{"label":"Argyll and Bute","value":"","image":""},"8":{"label":"City of Edinburgh","value":"","image":""},"9":{"label":"Clackmannanshire","value":"","image":""},"10":{"label":"Comhairle nan Eilean Siar (Western Isles)","value":"","image":""},"11":{"label":"Dumfries and Galloway","value":"","image":""},"12":{"label":"Dundee City","value":"","image":""},"13":{"label":"East Ayrshire","value":"","image":""},"14":{"label":"East Dunbartonshire","value":"","image":""},"15":{"label":"East Lothian","value":"","image":""},"16":{"label":"East Renfrewshire","value":"","image":""},"17":{"label":"Falkirk","value":"","image":""},"18":{"label":"Fife","value":"","image":""},"19":{"label":"Glasgow City","value":"","image":""},"20":{"label":"Highland","value":"","image":""},"21":{"label":"Inverclyde","value":"","image":""},"22":{"label":"Midlothian","value":"","image":""},"23":{"label":"Moray","value":"","image":""},"24":{"label":"North Ayrshire","value":"","image":""},"25":{"label":"North Lanarkshire","value":"","image":""},"26":{"label":"Orkney Islands","value":"","image":""},"27":{"label":"Perth and Kinross","value":"","image":""},"28":{"label":"Renfrewshire","value":"","image":""},"29":{"label":"Scottish Borders","value":"","image":""},"30":{"label":"Shetland Islands","value":"","image":""},"31":{"label":"South Ayrshire","value":"","image":""},"32":{"label":"South Lanarkshire","value":"","image":""},"33":{"label":"Stirling","value":"","image":""},"34":{"label":"West Dunbartonshire","value":"","image":""},"35":{"label":"West Lothian","value":"","image":""},"36":{"label":"England","value":"","image":""},"37":{"label":"Wales","value":"","image":""},"38":{"label":"Northern Ireland","value":"","image":""},"39":{"label":"Outside UK","value":"","image":""}},"description":"","required":"1","style":"classic","size":"medium","placeholder":"Select from dropdown","css":"","dynamic_choices":""},"6":{"id":"6","type":"checkbox","label":"Do you want to keep up to date with what's going on at Salvesen Mindroom Centre?","choices":{"1":{"label":"Yes, please - sign me up","value":"","image":""},"3":{"label":"Not just now, thanks","value":"","image":""}},"description":"","required":"1","choices_images_style":"modern","input_columns":"","choice_limit":"","css":"","dynamic_choices":""}},"settings":{"form_title":"Future Me, My Digital Workbook","form_desc":"Please fill out this form to access the Future Me, My Digital Workbook.","form_class":"","submit_text":"Go to resource","submit_text_processing":"Sending...","submit_class":"","antispam":"1","notification_enable":"1","notifications":{"5":{"notification_name":"Submission automation","email":"","subject":"Future Me - Download","sender_name":"","sender_address":"OurEmail","replyto":"chris@mindroom.org","message":"{all_fields}"},"3":{"notification_name":"Mailchimp","email":"admin@mindroom.org","subject":"Mailchimp sign ups from digital workbook"

     

     

     

  • Paulie78 Profile Picture
    8,424 Moderator on at

    Well done, it imported into my environment perfectly after I fixed up the HTML. will have a look for you later tonight. I've got to go and play a tennis match now. 🎾 ✔️

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 460

#2
Vish WR Profile Picture

Vish WR 343

#3
David_MA Profile Picture

David_MA 249 Super User 2026 Season 1

Last 30 days Overall leaderboard