Issue with Gmail Replies Not Staying in the Same Thread

I’m working on an AI agent project that reads the emails I receive, crafts a reply, and then saves it as a draft.

The agent works perfectly—it crafts the email and saves it in the draft without any issues. However, the problem arises when I manually approve the draft and send it to the person I received the email from. Instead of staying in the thread, it gets sent as a new email.

I’ve cross-checked everything, including the thread ID, and it all seems correct. The reply should stay in the same thread, but it doesn’t. I’m using the self-hosted version of the tool.

Any insights or suggestions to fix this would be greatly appreciated!

and this node :

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hello @Rohit_Gurav,

I’ve just tested this with my Gmail account and I created a new draft on a previous thread. Can you double check the thread ID is correct in this node? I didn’t change the “to email” address so try it without that and see if that works.

We have the same problem over here! And not found solution just yet.
From the API documentation of GMAIL, we have to reference the “in-reply-to” when it’s a thread, but it doesn’t seem to be possible in any GMAIL node. So we’re exploring a HTTP request.

i actually found the solution for this