Button missing in G Suite email subject line despite successful Gmail markup test

I’m having trouble with email markup in our company’s G Suite. The button shows up fine in the subject line when I test it in regular Gmail. But when I use the same script in our G Suite Gmail it’s not there.

I’m wondering if this might be related to DKIM setup. We can see email markup from outside senders in our G Suite inbox. Do we need to tweak any settings or add extra code to make it work for outgoing emails?

Here’s a quick example of what I tried:

function sendEmailWithMarkup() {
  var recipient = '[email protected]';
  var subject = 'Approve request';
  var body = 'Please approve this request.';
  
  var markup = '<script type="application/ld+json">' +
    '{' +
    '  "@context": "http://schema.org",' +
    '  "@type": "EmailMessage",' +
    '  "potentialAction": {' +
    '    "@type": "ConfirmAction",' +
    '    "name": "Approve",' +
    '    "handler": {' +
    '      "@type": "HttpActionHandler",' +
    '      "url": "https://example.com/approve"' +
    '    }' +
    '  },' +
    '  "description": "Approve this request"' +
    '}' +
    '</script>';

  MailApp.sendEmail(recipient, subject, body, {htmlBody: body + markup});
}

Any ideas on why it’s not working in G Suite?

I encountered this issue as well. In our case, it turned out to be related to DKIM configuration. Ensure your DKIM is properly set up in G Suite admin console. Additionally, check if email markup is enabled for your domain.

Another thing to consider is the timing. There can be a delay between sending the email and the markup appearing. Sometimes it took up to an hour for the button to show up in our G Suite environment.

If these don’t resolve the issue, you might want to try implementing the markup using the Gmail API instead of MailApp. This approach gave us more consistent results across different environments.

hey, i had a similar issue. check ur gsuite admin settings - might be a security policy blocking markup. also, verify dkim is configured. if that doesnt work, try adding markup directly in htmlbody. good luck!

I’ve dealt with this frustrating issue before. One thing that worked for us was double-checking our SPF records along with DKIM. Sometimes, even if DKIM is set up correctly, an incorrect SPF record can cause problems with email markup.

Also, have you tried testing with different email clients? We found that some clients (like Outlook) were more finicky about displaying the markup than others. It might be worth sending test emails to various client types to see if the problem is universal or specific to certain setups.

Lastly, consider the content of your emails. We discovered that certain keywords or patterns in the email body sometimes triggered spam filters, which in turn affected the markup display. Try simplifying your test emails to rule this out.

If all else fails, reaching out to G Suite support directly might be your best bet. They can often spot domain-specific issues that aren’t immediately obvious.