Discussions

 View Only
  • 1.  Outlook Pipeline Email Body

    Posted 12-01-2022 13:45
    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
    ------------------------------


  • 2.  RE: Outlook Pipeline Email Body

    Posted 12-01-2022 13:57
    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 





  • 3.  RE: Outlook Pipeline Email Body

    Posted 12-01-2022 14:56
    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
    ------------------------------



  • 4.  RE: Outlook Pipeline Email Body

    Posted 12-01-2022 15:13
    Example:

    {% set bod = a.body|replace('searchedString', "newString") %}





  • 5.  RE: Outlook Pipeline Email Body

    Posted 29 days ago
    Edited by Kimberly Massa 29 days ago

    Hi Marcelo,

    How did you implement this into your pipeline? Actually, I got it.

    Thanks,

    Kim



    ------------------------------
    Kimberly Massa
    ------------------------------



  • 6.  RE: Outlook Pipeline Email Body

    Posted 12-01-2022 15:42
    The striptags filter should do what you want:  {{ email.body | striptags }}

    ------------------------------
    Doug Henning
    ------------------------------



  • 7.  RE: Outlook Pipeline Email Body

    Posted 12-01-2022 15:53
    Wow,  no one has ever posted that before!
    I see now that it's a function here

    https://jinja.palletsprojects.com/en/2.11.x/templates/#list-of-builtin-filters

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 8.  RE: Outlook Pipeline Email Body

    Posted 12-01-2022 16:24
    Yes, I did try right now, work PERFECT!

    Thank you!





  • 9.  RE: Outlook Pipeline Email Body

    Posted 12-02-2022 10:41
    very helpful, thank you!

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