Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
277 changes: 271 additions & 6 deletions apps/docs/content/docs/integrations/gmail.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ Send emails using Gmail.
| `body` | string | Yes | Email body content |
| `contentType` | string | No | Content type for the email body \(text or html\) |
| `threadId` | string | No | Thread ID to reply to \(for threading\) |
| `replyToMessageId` | string | No | Gmail message ID to reply to - use the "id" field from Gmail Read results \(not the RFC "messageId"\) |
| `replyToMessageId` | string | No | Gmail message ID to reply to - use the "id" field from Gmail Read results \(not "rfcMessageId"\) |
| `cc` | string | No | CC recipients \(comma-separated\) |
| `bcc` | string | No | BCC recipients \(comma-separated\) |
| `replyTo` | string | No | Reply-To address that replies should go to \(e.g., support@example.com\) |
| `attachments` | file[] | No | Files to attach to the email |

#### Output
Expand Down Expand Up @@ -81,9 +82,10 @@ Draft emails using Gmail.
| `body` | string | Yes | Email body content |
| `contentType` | string | No | Content type for the email body \(text or html\) |
| `threadId` | string | No | Thread ID to reply to \(for threading\) |
| `replyToMessageId` | string | No | Gmail message ID to reply to - use the "id" field from Gmail Read results \(not the RFC "messageId"\) |
| `replyToMessageId` | string | No | Gmail message ID to reply to - use the "id" field from Gmail Read results \(not "rfcMessageId"\) |
| `cc` | string | No | CC recipients \(comma-separated\) |
| `bcc` | string | No | BCC recipients \(comma-separated\) |
| `replyTo` | string | No | Reply-To address that replies should go to \(e.g., support@example.com\) |
| `attachments` | file[] | No | Files to attach to the email draft |

#### Output
Expand Down Expand Up @@ -113,9 +115,10 @@ Update an existing Gmail draft in place without deleting and recreating it.
| `body` | string | Yes | Email body content |
| `contentType` | string | No | Content type for the email body \(text or html\) |
| `threadId` | string | No | Thread ID to associate the draft with \(for threading\) |
| `replyToMessageId` | string | No | Gmail message ID to reply to - use the "id" field from Gmail Read results \(not the RFC "messageId"\) |
| `replyToMessageId` | string | No | Gmail message ID to reply to - use the "id" field from Gmail Read results \(not "rfcMessageId"\) |
| `cc` | string | No | CC recipients \(comma-separated\) |
| `bcc` | string | No | BCC recipients \(comma-separated\) |
| `replyTo` | string | No | Reply-To address that replies should go to \(e.g., support@example.com\) |
| `attachments` | file[] | No | Files to attach to the email draft |

#### Output
Expand Down Expand Up @@ -154,13 +157,21 @@ Read emails from Gmail.
| `labelIds` | array | Email labels |
| `from` | string | Sender email address |
| `to` | string | Recipient email address |
| `cc` | string | Cc recipients \(raw Cc header\) |
| `bcc` | string | Bcc recipients \(only present on messages you sent or drafted\) |
| `replyTo` | string | Reply-To header |
| `subject` | string | Email subject |
| `date` | string | Email date |
| `rfcMessageId` | string | RFC Message-ID header \(not the Gmail message id\) |
| `inReplyTo` | string | In-Reply-To header |
| `references` | string | References header |
| `snippet` | string | Short excerpt of the message text |
| `internalDate` | string | Gmail internal creation timestamp in epoch milliseconds |
| `body` | string | Email body text \(best-effort plain text\) |
| `hasAttachments` | boolean | Whether the email has attachments |
| `attachmentCount` | number | Number of attachments |
| `attachments` | file[] | Downloaded attachments \(if enabled\) |
| `results` | json | Summary results when reading multiple messages |
| `results` | json | Summary results when reading multiple messages \(id, threadId, subject, from, to, cc, bcc, replyTo, date, rfcMessageId, inReplyTo, references, snippet, internalDate\) |

</ReferenceDetails>

Expand All @@ -175,13 +186,16 @@ Search emails in Gmail.
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `query` | string | Yes | Search query for emails |
| `maxResults` | number | No | Maximum number of results to return \(e.g., 10, 25, 50\) |
| `maxResults` | number | No | Maximum number of results to return \(e.g., 10, 25, 50; Gmail default: 100, max: 500\) |
| `pageToken` | string | No | Page token from a previous search \(nextPageToken\) to fetch the next page |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `results` | json | Array of search results |
| `results` | json | Array of search results \(id, threadId, subject, from, to, cc, bcc, replyTo, date, snippet, rfcMessageId, inReplyTo, references, internalDate\) |
| `nextPageToken` | string | Token for fetching the next page of results |
| `resultSizeEstimate` | number | Estimated total number of results |

</ReferenceDetails>

Expand Down Expand Up @@ -384,6 +398,251 @@ List all labels in a Gmail account

</ReferenceDetails>

### Gmail Create Label

Create a new label in Gmail

<ReferenceDetails>

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `name` | string | Yes | Display name for the new label |
| `messageListVisibility` | string | No | Visibility of messages with this label in the message list \(show or hide\) |
| `labelListVisibility` | string | No | Visibility of the label in the label list \(labelShow, labelShowIfUnread, or labelHide\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Label ID |
| `name` | string | Label display name |
| `messageListVisibility` | string | Visibility of messages with this label |
| `labelListVisibility` | string | Visibility of the label in the label list |
| `type` | string | Label type \(system or user\) |

</ReferenceDetails>

### Gmail Update Label

Update a Gmail label in place (rename or change visibility) without recreating it

<ReferenceDetails>

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `labelId` | string | Yes | ID of the label to update \(from Gmail List Labels\) |
| `name` | string | No | New display name for the label |
| `messageListVisibility` | string | No | Visibility of messages with this label in the message list \(show or hide\) |
| `labelListVisibility` | string | No | Visibility of the label in the label list \(labelShow, labelShowIfUnread, or labelHide\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Label ID |
| `name` | string | Label display name |
| `messageListVisibility` | string | Visibility of messages with this label |
| `labelListVisibility` | string | Visibility of the label in the label list |
| `type` | string | Label type \(system or user\) |

</ReferenceDetails>

### Gmail Delete Label

Delete a label from Gmail

<ReferenceDetails>

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `labelId` | string | Yes | ID of the label to delete |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `deleted` | boolean | Whether the label was successfully deleted |
| `labelId` | string | ID of the deleted label |

</ReferenceDetails>

### Gmail List Drafts

List all drafts in a Gmail account

<ReferenceDetails>

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `maxResults` | number | No | Maximum number of drafts to return \(default: 100, max: 500\) |
| `pageToken` | string | No | Page token for paginated results |
| `query` | string | No | Search query to filter drafts \(same syntax as Gmail search\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `drafts` | json | Array of draft objects with id, messageId, and threadId |
| `resultSizeEstimate` | number | Estimated total number of drafts |
| `nextPageToken` | string | Token for fetching the next page of results |

</ReferenceDetails>

### Gmail Get Draft

Get a specific draft from Gmail by its ID

<ReferenceDetails>

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `draftId` | string | Yes | ID of the draft to retrieve |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Draft ID |
| `messageId` | string | Gmail message ID |
| `threadId` | string | Gmail thread ID |
| `to` | string | Recipient email address |
| `from` | string | Sender email address |
| `cc` | string | Cc recipients |
| `bcc` | string | Bcc recipients |
| `replyTo` | string | Reply-To header |
| `subject` | string | Draft subject |
| `date` | string | Date header |
| `rfcMessageId` | string | RFC Message-ID header \(not the Gmail message id\) |
| `inReplyTo` | string | In-Reply-To header |
| `references` | string | References header |
| `snippet` | string | Short excerpt of the draft text |
| `body` | string | Draft body text |
| `labelIds` | array | Draft labels |

</ReferenceDetails>

### Gmail Delete Draft

Delete a specific draft from Gmail

<ReferenceDetails>

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `draftId` | string | Yes | ID of the draft to delete |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `deleted` | boolean | Whether the draft was successfully deleted |
| `draftId` | string | ID of the deleted draft |

</ReferenceDetails>

### Gmail List Threads

List email threads in a Gmail account

<ReferenceDetails>

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `maxResults` | number | No | Maximum number of threads to return \(default: 100, max: 500\) |
| `pageToken` | string | No | Page token for paginated results |
| `query` | string | No | Search query to filter threads \(same syntax as Gmail search\) |
| `labelIds` | string | No | Comma-separated label IDs to filter threads by |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `threads` | json | Array of thread objects with id, snippet, and historyId |
| `resultSizeEstimate` | number | Estimated total number of threads |
| `nextPageToken` | string | Token for fetching the next page of results |

</ReferenceDetails>

### Gmail Get Thread

Get a specific email thread from Gmail, including all messages in the thread

<ReferenceDetails>

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `threadId` | string | Yes | ID of the thread to retrieve |
| `format` | string | No | Format to return the messages in \(full, metadata, or minimal\). Defaults to full. |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Thread ID |
| `historyId` | string | History ID |
| `snippet` | string | Short excerpt of the thread |
| `messages` | json | Array of messages in the thread with id, threadId, labelIds, snippet, from, to, cc, bcc, replyTo, subject, date, rfcMessageId, inReplyTo, references, internalDate, and body |

</ReferenceDetails>

### Gmail Trash Thread

Move an email thread to trash in Gmail

<ReferenceDetails>

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `threadId` | string | Yes | ID of the thread to trash |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Thread ID |
| `trashed` | boolean | Whether the thread was successfully trashed |

</ReferenceDetails>

### Gmail Untrash Thread

Remove an email thread from trash in Gmail

<ReferenceDetails>

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `threadId` | string | Yes | ID of the thread to untrash |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Thread ID |
| `untrashed` | boolean | Whether the thread was successfully removed from trash |

</ReferenceDetails>



## Triggers
Expand Down Expand Up @@ -420,6 +679,12 @@ Triggers when new emails are received in Gmail (requires Gmail credentials)
| ↳ `from` | string | Sender email address |
| ↳ `to` | string | Recipient email address |
| ↳ `cc` | string | CC recipients |
| ↳ `bcc` | string | BCC recipients \(only present on messages you sent\) |
| ↳ `replyTo` | string | Reply-To header |
| ↳ `rfcMessageId` | string | RFC Message-ID header \(not the Gmail message ID\) |
| ↳ `inReplyTo` | string | In-Reply-To header \(RFC Message-ID of the parent message\) |
| ↳ `references` | string | References header \(RFC Message-IDs in the thread\) |
| ↳ `snippet` | string | Short excerpt of the message text |
| ↳ `date` | string | Email date in ISO format |
| ↳ `bodyText` | string | Plain text email body |
| ↳ `bodyHtml` | string | HTML email body |
Expand Down
Loading
Loading