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!
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.
We’ve identified an issue with our current setup: when sending a draft reply manually, the In-Reply-To and References headers are modified, causing the email to appear as a new thread for the recipient instead of continuing the existing thread.
Could @Rohit_Gurav or anyone please share a solution to ensure the email remains in the same thread when sent manually? Additionally, if there are any alternative approaches to address this issue, I’d greatly appreciate the insights.
@Rohit_Gurav not yet, for now saving in draft only, and manually replying.
As @Fra001010 said they will be working on the node part for this capability. @Fra001010 if there is any timeline and can be mentioned here, would be great know.
In Gmail, the draft (before send them) are present in the draft folder and if you do them manually they stay in the inbox at the end of the thread. But on n8n they are only present in the draft folder as gmail api require other params to align the draft to stay in the inbox thread conversation. I write some note here: Enhance Gmail Node to Support Threaded Drafts asking for the feature to be added as shuld be relative fast to implement!
Same issue here, can’t create an email to stay within the same thread (I have the threadid available in my automation)… would love for this to be fixed asap! Tnx!