I have a Google Apps Script that sends automated reports from a spreadsheet to parents. I’m trying to add emoji symbols like , , and to make the emails look nicer, but they keep showing up as question mark symbols (�) when people receive them.
I’ve tested different approaches but nothing seems to work consistently. Some email clients show the emojis correctly while others just display the replacement characters. The problem seems worse on managed school email accounts.
Here’s my current code:
const emailContent =
`Hello ${parentName},
Weekly progress report for ${childName}:
📚 Achievements:
${achievements || 'Nothing to report this week.'}
⚡ Areas for improvement:
${improvements || 'All going well.'}
💡 Teacher comments:
${comments || 'No additional feedback.'}
Best regards,
The Teaching Team`;
GmailApp.sendEmail(recipientEmail, emailSubject, emailContent);
I’ve tried switching between plain text and HTML format but the emoji encoding issue persists. Some simpler symbols like ★ and ✓ work better than complex ones.
Does anyone know how to fix emoji encoding in Google Apps Script emails? Is this a Gmail limitation or something I can solve with different settings?
honestly this is super frustrating issue with gas. what fixed it for me was using unicode escape sequences instead of copy-pasting emojis directly. like \ud83d\udcda for the book emoji. gas handles these better than raw unicode characters and they display consistently accross different email providers.
Had this exact same issue when I was building an automated newsletter system last year. The problem isn’t with your code but with how different email clients handle character encoding. What worked for me was switching to HTML format and explicitly setting the content type with UTF-8 encoding. Instead of using GmailApp.sendEmail directly, try using MailApp.sendEmail with htmlBody parameter and make sure to include proper meta tags in your HTML content. Also found that copying emojis directly from a UTF-8 source rather than typing them helped with consistency. The managed school accounts you mentioned often have stricter encoding policies which explains why they’re more problematic. Consider using HTML entity codes for critical symbols as a fallback - they’re less visually appealing but render consistently across all clients.
I encountered similar encoding issues when developing automated parent communication scripts for our district. The core problem stems from how Google Apps Script handles character encoding by default. What solved it for me was explicitly declaring the charset in the email headers. Try using GmailApp.sendEmail with the attachments parameter (even if empty) which allows you to specify additional options like charset=‘UTF-8’. Another approach that worked consistently was converting problematic emojis to their HTML entity equivalents - for instance, using instead of . This ensures compatibility across all email clients including the restrictive managed school systems. I also discovered that testing with personal Gmail accounts versus institutional ones can give completely different results, so always test on the actual target email system. The HTML format approach mentioned earlier is solid, but make sure you’re declaring UTF-8 in both the script properties and email headers.