Unitalk Gmail icon

Unitalk Gmail

Consume the Gmail API with Unitalk

Thread → Get

AI-generated

Summary

Fetch a Gmail thread by ID

Inputs

  • threadId (required) — The ID of the thread you are operating on
  • simple — Whether to return a simplified response with metadata headers instead of full data
  • options — Additional operation options

Output shape

If returnOnlyMessages is true: array of simplified message objects. If false: array containing [{ json: simplifiedThreadObject }]. The simple flag sets the API format to metadata (with From/To/Cc/Bcc/Subject headers) or full. Returned snippets are unescaped for get/getAll operations.

API request uses GET /gmail/v1/users/me/threads/${threadId}. Format is metadata when simple=true (with metadataHeaders From/To/Cc/Bcc/Subject), otherwise full. returnOnlyMessages=true returns the thread's messages array simplified; false wraps the simplified thread as { json: ... }.

Examples

Example 1: Get a thread with simplified messages only

Set threadId to the target thread's ID, keep simple=true (default) and returnOnlyMessages=true (default)

Example 2: Get a full thread object

Set threadId, set simple=false, and set returnOnlyMessages=false to receive the complete thread with simplified messages wrapped in { json: ... }

Links

Discussion