Forum Discussion

eduardovaldes's avatar
eduardovaldes
Qrew Member
10 months ago

UTF-8 in Gmail Channel

Have a pipeline that sends a gmail.
 
The body is a field from my table.
 
I can read that field utf-8 encoded in quickbase, but when the email is sent it changes the characters to ascii
 
Using the gmail channel, any known workarround?
Thanks


------------------------------
eduardo valdes
------------------------------

5 Replies

  • Eduardo - I had a second so I did a quick check. Looks like you need to convert to Base64 when submitting to the api...  so there's probably some testing and research you'll need to do. 

    I haven't dealt with this myself - but this is where I'd start....

    What I found - 

    https://developers.google.com/gmail/api/guides/sending - Mail API

    RFC 2822 (https://datatracker.ietf.org/doc/html/rfc2822

    Found this conversion for js - https://github.com/googleapis/google-api-nodejs-client/pull/1088

     const utf8Subject = `=?utf-8?B?${Buffer.from(subject).toString('base64')}?=`;

    doing something similar with jinja/formula field might be possible? dunno. 

    aged stackoverflow suggestion - https://stackoverflow.com/questions/61905243/does-gmail-restful-api-support-sending-of-non-ascii-emails-addresses#:~:text=At%20the%20moment%20of%20this,able%20to%20send%20the%20emails.



    ------------------------------
    joe vandervest
    ------------------------------
    • eduardovaldes's avatar
      eduardovaldes
      Qrew Member

      Joe, I managed to find a workaround.

       

      By the way QuickBase has a native base64 encode and decode function.

      I tried in a formula field using that formula field in the Gmail body.

      It didn't work.

      I was reading the fields of the trigger event.

       

      I added another step in the pipelines LOOK RECORD and populated the body of Gmail message with the output of that look record and magically it worked, all the Portuguese diacritics correct.

       

      Now I am struggling with the Attachments. Maybe I open another discussion.

      I have managed to move attachments within QuickBase, using The File handler.

       

      I want to:

      • Send a Gmail with an attachment.

      • Link that Gmail with QuickBase record (it seems to have an option).

      • Wait for the customer response to that email.

      • If the response has an attachment identify it and upload it to QuickBase to the linked record.     

       

      What is not working?

      a.- I have not succeeded in using the attachments section of Gmail Chanell: Tried a couple of combinations of Type MIME and (file handler/Browser URL) from previous steps.

      The field that has the PDF in QuickBase is open to EOIT

       

       

      b.-The pipeline identifies the response email, identifies that the response has an attachment, but I have not succeeded in putting it in the QuickBase record.

      I remember that I did that with QuickBase sync and google drive in the past

      The error message gives not many clues……

       

      Someone has achieved that? (quite a simple set up for gmail channel),

      Have read similar things with outlook but not gmail

      I am sure I must be doing something wrong

      Thanks



      ------------------------------
      eduardo valdes
      ------------------------------
      • JosephMahon's avatar
        JosephMahon
        Qrew Member

        Following to see if anyone can figure out how to attach a file from a file field and send via Gmail.  I have tried all combinations from the file field and have tried extracting the URL but nothing seems to work for me. 



        ------------------------------
        Joseph Mahon
        ------------------------------
  • My issue is with attachments as well, but it's not that I want to send one. The Gmail channel makes the Attachments URL a required field for some reason. Would love to turn this off, if anyone has experienced it.

    In case you never figured out the ASCII issue, using HTML in the body solves this. I use this to send an email to an address from an email field on my table and use markup around the field placeholder in the body.

    <p>Dear {{a.requester}},</p>

    <p><b>Ticket:</b>{{a.task}}</p>

    <p><b>Definition:</b></p>
    <p>{{a.definition}}</p>

    <p>----------------------------------------------------------</p>

    <p><b>Solution:</b></p>
    <p>{{a.solution}}</p>

    <p>Thank you,</p>



    ------------------------------
    Barry Dolan
    ------------------------------