Automated Emails Not Threading? Store the Thread ID
Automated emails start a new thread because the sending step never receives the identity of the message it should be replying to. Zapier, Make, and n8n each ship a reply action that threads correctly, but all three require a thread or message ID that only exists if an email started the run, so workflows triggered by a form, a CRM update, or a schedule have to store the thread handle on the record at first send.
An automated email starts a new thread because the step that sends it never learns the identity of the message it is supposed to be answering. Threading is not a formatting preference or a checkbox you missed. It is a handle, a thread ID or a Message-ID, that has to be carried out of the earlier message and handed to the later one. Zapier, Make, and n8n all ship a reply action that threads correctly, and all three refuse to run without that handle. Whether you have one is decided by what triggered the workflow, not by which email step you picked.
Reply-To is not In-Reply-To
RFC 5322 is specific about how a reply identifies its parent. The In-Reply-To field carries the contents of the parent message's Message-ID. The References field carries the parent's References field, if it has one, followed by the parent's Message-ID. Both values belong to the earlier message. Neither can be invented by the step doing the sending.
Reply-To is a different header doing a different job. It sets the address a reply gets addressed to. n8n's Gmail Send operation exposes it as "Send Replies To," and it is the field people reach for when they want threading, because the name reads like it should do that. It does nothing for threading. A message with a correct Reply-To and no References header opens a new conversation in every mail client on the market.
The specification also says reply messages SHOULD carry In-Reply-To and References. Should, not must. No mail server rejects a message for missing them, so your execution log stays green while the customer collects orphans.
What each platform's reply action actually needs
| Step | What it requires | Where the value comes from |
|---|---|---|
| Zapier, Gmail "Reply to Email" | Thread | Thread ID from a Gmail trigger, or from a Find Email action step |
| Make, Gmail "Reply to an email" | Thread ID | The ID finder, or an earlier Gmail module in the scenario |
| n8n, Gmail "Reply to a message" | Message ID | A Gmail trigger, or a Get Many Messages step |
| Microsoft Graph, createReply or reply | The message id in the request path | A read against the mailbox |
| Any generic Send Email or SMTP step | Nothing threading-related | It cannot thread |
Zapier documents the failure by name. Put a subject line or a sender's name into the Thread field and Gmail returns "Invalid id value," because the field wants an ID and you gave it prose. The same help page states that if the Zap has no Gmail trigger, you must add a Find Email action step to obtain the Thread ID first.
The bottom row is the one that explains most broken threads. A generic send step takes a recipient, a subject, and a body. There is no input for the parent's identity, so there is nothing to configure and nothing to fix inside that step.
The trigger decides whether threading is possible at all
| What starts the run | Handle available in the run | Can it thread |
|---|---|---|
| Inbound email trigger | Thread ID and Message ID in the trigger payload | Yes, immediately |
| A message the same run sent a step earlier | In the send step's own output | Yes |
| Form submission | None | Only from a stored handle |
| CRM record update | None | Only from a stored handle |
| Schedule | None | Only from a stored handle |
| Webhook from your own app | None, unless you put it there | Only from a stored handle |
Follow-up sequences live in the bottom four rows. A three-touch sequence to a new lead fires once on a form submission and twice on a schedule, and not one of those three runs has ever seen the first email. That is why the sequence produces three separate items in the inbox no matter how carefully the copy references the previous message.
The usual workaround is a search: find the customer's most recent message by address or subject, take its thread, reply into that. It works in a demo and fails in the two situations that matter. If the customer has two open matters with you, the search returns the newer one, which is not necessarily the right one. If the customer replied and edited the subject, the search misses entirely.
Store the handle instead. At the moment of the first send, write four values to the customer or job record:
- The provider's thread handle, meaning the Gmail threadId or the Outlook conversationId.
- The Message-ID of the message you just sent.
- The exact subject string that went out, character for character.
- The mailbox it was sent from.
The fourth is the one people leave out and the one that bites. A Gmail thread ID is scoped to a mailbox. A handle captured under sales@ means nothing to a workflow authenticated as support@, so a sequence that opens from one shared address and follows up from another fails with a perfectly valid ID in hand.
The second value earns its place on the inbound side. When the customer replies, their mail client sets In-Reply-To to the Message-ID of your message. If you stored it, matching an incoming reply to the right record is an exact string comparison instead of a guess based on the sender's address, which breaks the moment someone answers from their phone using a different account. We build lead follow-up this way for that reason: the reply has to land on the record that sent it, not on a best guess. It is the same discipline behind any working lead capture and follow-up system.
Gmail's third condition is the subject line
Google's Gmail API documentation lists three criteria for adding a message to an existing thread, and all three have to be met. The threadId must be specified on the message. The References and In-Reply-To headers must be set in compliance with RFC 2822. And the Subject headers must match.
The third one is where personalization quietly kills threading. If the first message went out as "Your quote from Riverside HVAC" and the follow-up template renders "Riverside HVAC quote #4417 for Dana," the headers can be flawless and Gmail still detaches it. Gmail's user-facing help states the same rule from the reader's side: a conversation breaks off into a new conversation when the subject line changes, or when the conversation gets past 100 emails.
This is the argument for storing the subject rather than regenerating it. Templates drift. Somebody adds a merge field in six months, and nobody connects that edit to the support inbox slowly filling with messages that lost their history.
Outlook does not use the same key
Microsoft tracks conversations with properties of its own. A Graph message carries conversationId and conversationIndex, and Graph's MIME reply examples include Thread-Topic and Thread-Index headers alongside the subject. A References chain you assembled by hand can thread cleanly in Gmail and still arrive as a loose item in Outlook.
The practical rule that falls out of this: use the mailbox provider's own reply API rather than hand-building headers on an SMTP step. The Gmail reply action, Make's Reply to an email module, and Graph's createReply and reply endpoints each set their provider's keys correctly without you needing to know which headers those are. Then test against both. Threading is one of the few things where "it looked right in my inbox" proves close to nothing, because your inbox is a single provider.
The opposite failure: unrelated notices collapsing into one thread
The same mechanism runs in reverse, and almost nobody plans for it. Google's guidance on automated messages says Gmail groups them when they share the same recipients, senders, or subjects as previous messages, when their reference header IDs match, or when they were sent within one week of each other. The stated way to prevent that grouping is unique subject lines or distinct reference header values.
Read the criteria again: sender, subject, one week. A shipping notice with the subject "Your order has shipped" sent to a customer who orders twice a week collapses into a single conversation. In the inbox that is one line. The customer opens it, sees the oldest message on top, and calls to ask where the second package went.
So the cure for one failure is the cause of the other, and there is no single policy that covers all your outbound mail. Decide per stream:
- Streams about one continuing thing should thread. A support ticket, a quote under negotiation, a job in progress. Identical subject, stored handle, reply action.
- Streams that emit one notice per object should not thread. Each order, each invoice, each appointment. Put the object identifier in the subject so every notice is its own conversation.
The test is what the reader has to do with the message. If they act on each one separately, each one needs its own line in the inbox.
How to fix this in an afternoon
Start by narrowing the scope. Most outbound mail is fine as separate messages, and only one or two streams cost you anything when the thread breaks. Usually it is the lead follow-up sequence and the reply path on support.
For each of those, do four things. Add the four storage fields to the record and populate them on the first send. Replace the generic send step with the platform's reply action, fed from the stored handle. Freeze the subject line for that stream and move personalization into the body where it belongs. Then send a real test to a Gmail address and an Outlook address, reply from both, and confirm your inbound workflow matched each reply to the right record rather than to the newest one.
If the follow-up runs off a schedule and you are not sure where the stored handle belongs, that decision sits with the rest of your workflow automation design, because the record holding the thread ID is usually the record holding the sequence state. And if mail is threading correctly but still going unread, the problem is upstream of all of this: check the domain you are sending from before you touch a single header. Questions about a specific stack are welcome at our contact page.
Frequently Asked Questions
SOURCES & CITATIONS
- Gmail API reference: Users.messages resource and threadId criteria — Google for Developershttps://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages
- Group emails into conversations — Gmail Helphttps://support.google.com/mail/answer/5900
- RFC 5322: Internet Message Format, section 3.6.4 Identification Fields — IETFhttps://www.rfc-editor.org/rfc/rfc5322
- Gmail error: Invalid id value — Zapierhttps://help.zapier.com/hc/en-us/articles/28787201163661-Gmail-error-Invalid-id-value
About Alexey Yushkin
Alexey is the founder of GENERAL INFORMATICS LLC. He designs and ships AI and automation systems for businesses and operators across the US.
Related reading
Want this kind of system in your business?
We build practical AI and automation systems for operators. Send us your current workflow and we will show you what to automate first.
