Issue with Gmail Trigger Node: Unable to Access Full Previous Conversation Context

Hi everyone,

I’m encountering an issue in my n8n workflow involving the Gmail Trigger node and the Gmail Reply operation. Here’s my setup:

  • I’m using the Gmail Trigger node to listen for emails with a specific subject.
  • Once an email is received, my workflow uses an AI node to generate a response, which is then sent back using Gmail’s “Reply” operation.

The problem occurs when the recipient replies to that email. The Gmail Trigger node receives the new email, but:

  1. The AI node has no context of the previous conversation.
  2. The snippet object in the Gmail Trigger node only contains a truncated version of the previous messages, and I can’t seem to retrieve the full conversation history (as shown in the attached screenshot).

I need a way to fetch the full email thread or access the previous conversation context so my AI can generate meaningful responses.

Can anyone guide me on how to achieve this? Is there a workaround to fetch the complete email content for the entire conversation thread using the Gmail Trigger node or any other solution?

Thanks in advance for your help!

Information on your n8n setup

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

Hi @Mayank_Nagariya,

If you turn off the ‘Simplify’ option and you should be able to get the full email body instead of the snippet:

image

Similar post here.

If you want to get the full thread, here’s one way of doing it:

  1. Gmail trigger: get the thread ID of the incoming email
  2. Gmail node: get all emails with the same thread ID (this only outputs the simplified version so if you want the untruncated full email body, you have to do 3
  3. Gmail node: get the full email content of each email in that thread
  4. Aggregate information you want to feed into your AI node

Hope that helps!