Skip to main content

Get Gmail attachment

Action ID: tools.gmail.get_attachment Download an attachment from a Gmail message.

Secrets

Required secrets:
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_USER_TOKEN.

Input fields

attachment_id
string
required
The attachment ID to retrieve
message_id
string
required
The message ID containing the attachment
user_id
string
User ID or ‘me’ for authenticated userDefault: "me".

Get Gmail message

Action ID: tools.gmail.get_message Get the full content of a Gmail message.

Secrets

Required secrets:
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_USER_TOKEN.

Input fields

message_id
string
required
The message ID to retrieve
format
string
Format: ‘full’ (complete), ‘metadata’ (headers only), ‘minimal’ (IDs only), ‘raw’ (RFC 2822)Default: "full".
user_id
string
User ID or ‘me’ for authenticated userDefault: "me".

Get Gmail message headers

Action ID: tools.gmail.get_message_headers Get only the headers of a Gmail message.

Secrets

Required secrets:
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_USER_TOKEN.

Input fields

message_id
string
required
The message ID to retrieve headers for
metadata_headers
array[string] | null
Specific headers to return (e.g., [‘From’, ‘To’, ‘Subject’]). If not specified, returns all headers.Default: null.
user_id
string
User ID or ‘me’ for authenticated userDefault: "me".

Get Gmail thread

Action ID: tools.gmail.get_thread Get all messages in an email thread.

Secrets

Required secrets:
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_USER_TOKEN.

Input fields

thread_id
string
required
The thread ID to retrieve
format
string
Format: ‘full’ (complete), ‘metadata’ (headers only), ‘minimal’ (IDs only)Default: "full".
user_id
string
User ID or ‘me’ for authenticated userDefault: "me".

List Gmail labels

Action ID: tools.gmail.list_labels List all Gmail labels for a user.

Secrets

Required secrets:
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_USER_TOKEN.

Input fields

user_id
string
User ID or ‘me’ for authenticated userDefault: "me".

Search Gmail messages

Action ID: tools.gmail.search_messages Search Gmail messages using Gmail’s search syntax.

Secrets

Required secrets:
  • google_gmail_oauth: OAuth token GOOGLE_GMAIL_USER_TOKEN.

Input fields

query
string
required
Gmail search query (e.g., ‘from:suspicious@evil.com has:attachment’)
max_results
integer
Maximum number of results to returnDefault: 10.
page_token
string | null
Page token for paginationDefault: null.
user_id
string
User ID or ‘me’ for authenticated userDefault: "me".