Reply to email include thread

Hi, im struggling to understand what the best practice is to send replies and include the thread.
What I do is get the body of the email i want to reply to and set that as the content of the text editor.
Users can then write a message above this thread and I send the whole thread as content.

Doing so makes the text in the text editor with large threads really big.

What is the best practice for this? I kinda want the flow that Google has where you have the thread collapsed behind a button. I can do this in a normal react component but can’t in the text editor.

Hello Andre,

Instead of including the entire thread in the body, simply use the reply_to_message_id parameter.

How It Works

When you provide reply_to_message_id, Nylas automatically:

  1. :white_check_mark: Sets the proper email headers (In-Reply-To, References) for threading

  2. :white_check_mark: Associates your reply with the correct thread_id

  3. :white_check_mark: Handles provider-specific threading (like Gmail’s g_thrid)

  4. :white_check_mark: Ensures email clients display the full thread correctly

You only need to send the NEW reply content - the recipient’s email client will handle displaying the full thread history.