# Gmail node subject text encoding issue

**URL:** <https://community.n8n.io/t/gmail-node-subject-text-encoding-issue/278854>\
**Category:** Questions\
**Tags:** gmail, encoding\
**Created:** [March 19, 2026, 6:14am UTC](https://community.n8n.io/t/gmail-node-subject-text-encoding-issue/278854 "2026-03-19T06:14:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![codeyourweb](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/codeyourweb/32/107207_2.png) [@codeyourweb](https://community.n8n.io/u/codeyourweb)\
**Post date:** [March 19, 2026, 6:14am UTC](https://community.n8n.io/t/gmail-node-subject-text-encoding-issue/278854/1 "2026-03-19T06:14:26Z")

</div>

## Describe the problem/error/question

Hi,

I’m facing an encoding problem while sending email with gmail node for every char with and accent (é,à,ô,î…). I noticed that this problem doesn’t occurs when i’m directly writing inside the node “subject” input but only when i pass this subject as an expression (from a code node, and before, from a datatable). On the n8n webUI, i do not encounter this encoding problem (even in the datatable).  
It looks like a double UTF-8 encoding issue but i can’t resolve it, even while using JS tricks like unescape(), decodeURI() or even with replacing in the string with something like .replace(/Ã©/g, ‘é’), both from the gmail node or the code block before.

Note: this encoding problem only occurs on email subject, not on the html content.  
Thanks in advance for any help on this topic

## What is the error message (if any)?

No error messaage but email subject has encoding issue with “é”,”è”,”à”,”ç”,”ô”…

## Please share your workflow

## Share the output returned by the last node

In web preview mode, output is correct. But when i receive the email. Subject containing a french word like “Actualités” appears like “ActualitÃƒÂ©s”

## Information on your n8n setup

- \*\*n8n version: latest (\*\*2.12.3)
- **Database (default: SQLite): SQLite**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main): default**
- **Running n8n via (Docker, npm, n8n cloud, desktop app): Docker (auto-hosted)**
- **Operating system: Ubuntu LTS on host - default image on container**

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [March 19, 2026, 7:28am UTC](https://community.n8n.io/t/gmail-node-subject-text-encoding-issue/278854/2 "2026-03-19T07:28:05Z")

</div>

Hi @codeyourweb Welcome! i have encountered this same issue with that subject field, i have used ` n8n-nodes-text-manipulation` community node and that fixed my issue as i added that node before the gmail node with decode html legacy to send exactly what i wanted, but you can even try using code node i have not personally tried using that but code node with normalizing the string can be a fix like:

```auto
// Force correct UTF-8 decoding if the string is double-encoded
const subject = Buffer.from(yourSubjectString, 'latin1').toString('utf8');
return [{ json: { subject } }];

```

Although this can sometimes be lossy in some cases but it is worth giving a try, using `replaceSpecialChars()` is good but it will eventually loose the meaning in some word cases. Let me know how that code node and community node performs in your use case.

---

<div class="post-metadata">

**Author:** ![codeyourweb](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/codeyourweb/32/107207_2.png) [@codeyourweb](https://community.n8n.io/u/codeyourweb)\
**Post date:** [March 19, 2026, 7:48am UTC](https://community.n8n.io/t/gmail-node-subject-text-encoding-issue/278854/3 "2026-03-19T07:48:25Z")

</div>

Hi, Thank you for this answer. I’ve tried with Buffer on my previous tests but i didn’t worked. I used `n8n-nodes-text-manipulation` and it works perfectly with these parameters:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/c/4/c4482045913127f992c0f95815c6aebe2cdf6026.png)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [March 28, 2026, 12:34pm UTC](https://community.n8n.io/t/gmail-node-subject-text-encoding-issue/278854/6 "2026-03-28T12:34:50Z")

</div>

Closed on March 28, 2026, 12:34pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
