Unitalk Gmail icon

Unitalk Gmail

Consume the Gmail API with Unitalk

Thread → Get Many

AI-generated

Summary

Fetch multiple threads from Gmail with filtering and result limiting.

Inputs

  • returnAll — When true, returns all matching threads; when false, limits results by the Limit parameter. Default: false.
  • limit — Maximum number of threads to return when Return All is false. Min: 1, Max: 500, Default: 10.
  • filters — Collection of filters to apply to the thread list.
  • filters.includeSpamTrash — Include threads from SPAM and TRASH labels. Default: false.
  • filters.labelIds — Only return threads that have all of the specified label IDs. Accepts label names or IDs from the available labels. Default: empty array.
  • filters.q — Gmail search query string (same format as Gmail search box). Default: empty string.
  • filters.readStatus — Filter by read status: 'both' (unread and read), 'unread', or 'read'. Default: 'unread'.
  • filters.receivedAfter — Only return threads received after this date (ISO string or timestamp).
  • filters.receivedBefore — Only return threads received before this date (ISO string or timestamp).

Output shape

Array of objects, each containing a 'json' property with thread data (snippets unescaped).

The exact structure of the thread object depends on the Gmail API thread resource.

Examples

Example 1: Get the 5 most recent unread threads from the INBOX

Set Return All to false, Limit to 5, and in Filters set Label IDs to 'INBOX' and Read Status to 'unread'.

Example 2: Get all threads with label 'Work' that contain attachments

Set Return All to true, and in Filters set Label IDs to 'Work' and Search query to 'has:attachment'.

Links

Discussion