Forum Discussion

TimD's avatar
TimD
Qrew Trainee
2 years ago

Outlook Pipeline Email Body

Hello,

I am trying to play around with the Outlook channel in Pipelines. I am creating a record in QB anytime an email is received in a particular folder. Everything seems to work great, I just can't seem to figure out how to rid the email body of the html tags?

i put the email.body on to a rich text field. When the form is viewed on EDIT mode, the rich text field is showing without the tags, however, when it comes to viewing the form, the tags appear.

this is what shows up:

<html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style> <!-- @font-face {font-family:"Cambria Math"} @font-face {font-family:Calibri} p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; font-size:11.0pt; font-family:"Calibri",sans-serif} span.EmailStyle18 {font-family:"Calibri",sans-serif; color:windowtext} .MsoChpDefault {font-size:10.0pt} @page WordSection1 {margin:1.0in 1.0in 1.0in 1.0in} div.WordSection1 {} --> </style></head><body lang="EN-US" link="#0563C1" vlink="#754F72" style="word-wrap:break-word">

TEST 2


is there a way for me to get  rid of these tags? I've tried making the field a text field and a rich text field, and while rich text is better, it's not a complete solution

------------------------------
Tim D
------------------------------
  • DougHenning1's avatar
    DougHenning1
    Community Manager
    The striptags filter should do what you want:  {{ email.body | striptags }}

    ------------------------------
    Doug Henning
    ------------------------------
  • I was struggling with that and finally I opted to use JINJA functions to replace strings... I don't know there is something more orthodox but it was the only thing that worked for me.

    Marcelo Benavides Torres 


    • TimD's avatar
      TimD
      Qrew Trainee
      yeah it's quite annoying to have to deal with! I was thinking I'd have to do some search and replace stuff but i didn't wanna do all that work since i'm only playing around!!

      do you mind pointing me where i can learn how to use JINJA functions to replace strings within the pipeline itself?

      ------------------------------
      Tim D
      ------------------------------