Documentation Index Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
Use this file to discover all available pages before exploring further.
Server path: /gmail | Type: Application | PCID required: Yes
Tool Description gmail_send_emailSend an email via Gmail. Supports CC/BCC, HTML content, attachments via URL, and email threading for replies gmail_draft_emailCreate a draft email in Gmail for user review before sending. Same options as gmail_send_email gmail_read_emailRead the full content of an email including body, headers, and attachment info. Use messageId from gmail_search_emails gmail_search_emailsSearch emails using Gmail search syntax. Returns structured email data including id, subject, from, to, cc, date, snippet, labelIds, and optionally attachments and body content. Supports bodyPreview when includeBody is “preview”, “text”, “html”, or “both”. gmail_modify_emailAdd or remove labels on an email. Use to mark read/unread, star, move to folders, or apply custom labels gmail_list_email_labelsList all Gmail labels (both system and custom). Returns label IDs needed for gmail_modify_email gmail_create_labelCreate a new custom Gmail label for organizing emails. Returns the label ID for use with gmail_modify_email gmail_update_labelRename a label or change its visibility settings gmail_delete_labelDelete a custom label. Emails with this label are NOT deleted, only the label is removed from them gmail_get_or_create_labelGet a label by name, creating it if it does not exist. Idempotent - safe to call multiple times gmail_batch_modify_emailsApply label changes to multiple emails at once. More efficient than calling gmail_modify_email repeatedly gmail_batch_delete_emailsDelete multiple Gmail messages by moving them to the trash using batch processing. Messages can be recovered from trash within 30 days. gmail_archive_emailArchive an email (removes from inbox but keeps it accessible in All Mail). Email is NOT deleted gmail_trash_emailMove email to Trash. Can be recovered within 30 days. gmail_download_attachmentDownload an email attachment and store it as an artifact. Returns a link to the stored file, metadata, and a text preview for supported types (PDF, DOCX, XLSX, PPTX). Get attachmentId from gmail_search_emails or gmail_read_email gmail_list_trigger_capabilitiesList available Gmail trigger types for automation. Used by the trigger configuration system gmail_poll_triggerPoll for new emails since last check. Used by automation triggers. Returns full email data including body and attachment info
gmail_send_email
Send an email via Gmail. Supports CC/BCC, HTML content, attachments via URL, and email threading for replies
Parameters:
Parameter Type Required Default Description tostring[] Yes — Recipient email addresses. Example: [“john@example.com ”, “jane@example.com ”] subjectstring Yes — Email subject line. For replies, prefix with “Re: ” to maintain thread context bodystring Yes — Email body content. Plain text by default. Set isHtml=true for HTML content isHtmlboolean No — Set to true when body contains HTML (e.g., <p>Hello</p>). Default: false (plain text) ccstring[] No — CC recipients. Example: [“manager@example.com ”] bccstring[] No — BCC recipients (hidden from other recipients). Example: [“archive@example.com ”] replyTostring No — Where replies should go if different from sender. Example: “support@example.com ” fromstring No — Send as a Gmail alias (must be configured in Gmail settings). Example: “sales@mycompany.com ” threadIdstring No — Thread ID to add this email to an existing conversation. Get from gmail_search_emails or gmail_read_email inReplyTostring No — Message-ID header of the email being replied to. Required with threadId for proper threading. Get from email headers attachmentUrlsstring[] No — URLs of files to attach. Supports any publicly accessible URL. Example: [“https://example.com/report.pdf ”]
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"to" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "Recipient email addresses. Example: [ \" john@example.com \" , \" jane@example.com \" ]"
},
"subject" : {
"type" : "string" ,
"description" : "Email subject line. For replies, prefix with \" Re: \" to maintain thread context"
},
"body" : {
"type" : "string" ,
"description" : "Email body content. Plain text by default. Set isHtml=true for HTML content"
},
"isHtml" : {
"type" : "boolean" ,
"description" : "Set to true when body contains HTML (e.g., <p>Hello</p>). Default: false (plain text)"
},
"cc" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "CC recipients. Example: [ \" manager@example.com \" ]"
},
"bcc" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "BCC recipients (hidden from other recipients). Example: [ \" archive@example.com \" ]"
},
"replyTo" : {
"type" : "string" ,
"description" : "Where replies should go if different from sender. Example: \" support@example.com \" "
},
"from" : {
"type" : "string" ,
"description" : "Send as a Gmail alias (must be configured in Gmail settings). Example: \" sales@mycompany.com \" "
},
"threadId" : {
"type" : "string" ,
"description" : "Thread ID to add this email to an existing conversation. Get from gmail_search_emails or gmail_read_email"
},
"inReplyTo" : {
"type" : "string" ,
"description" : "Message-ID header of the email being replied to. Required with threadId for proper threading. Get from email headers"
},
"attachmentUrls" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "URLs of files to attach. Supports any publicly accessible URL. Example: [ \" https://example.com/report.pdf \" ]"
}
},
"required" : [
"PCID" ,
"to" ,
"subject" ,
"body"
]
}
gmail_draft_email
Create a draft email in Gmail for user review before sending. Same options as gmail_send_email
Parameters:
Parameter Type Required Default Description tostring[] Yes — Recipient email addresses. Example: [“john@example.com ”, “jane@example.com ”] subjectstring Yes — Email subject line. For replies, prefix with “Re: ” to maintain thread context bodystring Yes — Email body content. Plain text by default. Set isHtml=true for HTML content isHtmlboolean No — Set to true when body contains HTML (e.g., <p>Hello</p>). Default: false (plain text) ccstring[] No — CC recipients. Example: [“manager@example.com ”] bccstring[] No — BCC recipients (hidden from other recipients). Example: [“archive@example.com ”] replyTostring No — Where replies should go if different from sender. Example: “support@example.com ” fromstring No — Send as a Gmail alias (must be configured in Gmail settings). Example: “sales@mycompany.com ” threadIdstring No — Thread ID to add this draft to an existing conversation. Get from gmail_search_emails or gmail_read_email inReplyTostring No — Message-ID header of the email being replied to. Required with threadId for proper threading. Get from email headers attachmentUrlsstring[] No — URLs of files to attach. Supports any publicly accessible URL. Example: [“https://example.com/report.pdf ”]
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"to" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "Recipient email addresses. Example: [ \" john@example.com \" , \" jane@example.com \" ]"
},
"subject" : {
"type" : "string" ,
"description" : "Email subject line. For replies, prefix with \" Re: \" to maintain thread context"
},
"body" : {
"type" : "string" ,
"description" : "Email body content. Plain text by default. Set isHtml=true for HTML content"
},
"isHtml" : {
"type" : "boolean" ,
"description" : "Set to true when body contains HTML (e.g., <p>Hello</p>). Default: false (plain text)"
},
"cc" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "CC recipients. Example: [ \" manager@example.com \" ]"
},
"bcc" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "BCC recipients (hidden from other recipients). Example: [ \" archive@example.com \" ]"
},
"replyTo" : {
"type" : "string" ,
"description" : "Where replies should go if different from sender. Example: \" support@example.com \" "
},
"from" : {
"type" : "string" ,
"description" : "Send as a Gmail alias (must be configured in Gmail settings). Example: \" sales@mycompany.com \" "
},
"threadId" : {
"type" : "string" ,
"description" : "Thread ID to add this draft to an existing conversation. Get from gmail_search_emails or gmail_read_email"
},
"inReplyTo" : {
"type" : "string" ,
"description" : "Message-ID header of the email being replied to. Required with threadId for proper threading. Get from email headers"
},
"attachmentUrls" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "URLs of files to attach. Supports any publicly accessible URL. Example: [ \" https://example.com/report.pdf \" ]"
}
},
"required" : [
"PCID" ,
"to" ,
"subject" ,
"body"
]
}
gmail_read_email
Read the full content of an email including body, headers, and attachment info. Use messageId from gmail_search_emails
Parameters:
Parameter Type Required Default Description messageIdstring Yes — Email message ID to retrieve. Get from gmail_search_emails results or trigger event data
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"messageId" : {
"type" : "string" ,
"description" : "Email message ID to retrieve. Get from gmail_search_emails results or trigger event data"
}
},
"required" : [
"PCID" ,
"messageId"
]
}
gmail_search_emails
Search emails using Gmail search syntax. Returns structured email data including id, subject, from, to, cc, date, snippet, labelIds, and optionally attachments and body content. Supports bodyPreview when includeBody is “preview”, “text”, “html”, or “both”.
Parameters:
Parameter Type Required Default Description querystring Yes — Gmail search query using Gmail search syntax maxResultsnumber No 10Maximum number of results to return (default: 10) includeBodystring No "none"Which email body format to include: “none” (default, no body content), “preview” (500-char preview using snippet, fast), “text” (full plain text body), “html” (full HTML body), or “both” (both text + HTML). Note: Options other than “none” and “preview” are slower and use more API quota. versionstring No "1"Tool version (use “1” for this version)
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID"
},
"query" : {
"type" : "string" ,
"description" : "Gmail search query using Gmail search syntax"
},
"maxResults" : {
"type" : "number" ,
"default" : 10 ,
"description" : "Maximum number of results to return (default: 10)"
},
"includeBody" : {
"type" : "string" ,
"enum" : [
"none" ,
"preview" ,
"text" ,
"html" ,
"both"
],
"default" : "none" ,
"description" : "Which email body format to include: \" none \" (default, no body content), \" preview \" (500-char preview using snippet, fast), \" text \" (full plain text body), \" html \" (full HTML body), or \" both \" (both text + HTML). Note: Options other than \" none \" and \" preview \" are slower and use more API quota."
},
"version" : {
"type" : "string" ,
"default" : "1" ,
"description" : "Tool version (use \" 1 \" for this version)"
}
},
"required" : [
"PCID" ,
"query"
]
}
gmail_modify_email
Add or remove labels on an email. Use to mark read/unread, star, move to folders, or apply custom labels
Parameters:
Parameter Type Required Default Description messageIdstring Yes — Email message ID to modify. Get from gmail_search_emails labelIdsstring[] No — Replace all labels with these. Use addLabelIds/removeLabelIds instead for partial updates addLabelIdsstring[] No — Labels to add. System labels: INBOX, STARRED, IMPORTANT, UNREAD, SPAM, TRASH. Or use custom label IDs from gmail_list_email_labels removeLabelIdsstring[] No — Labels to remove. Example: remove “UNREAD” to mark as read, remove “INBOX” to archive
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"messageId" : {
"type" : "string" ,
"description" : "Email message ID to modify. Get from gmail_search_emails"
},
"labelIds" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "Replace all labels with these. Use addLabelIds/removeLabelIds instead for partial updates"
},
"addLabelIds" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "Labels to add. System labels: INBOX, STARRED, IMPORTANT, UNREAD, SPAM, TRASH. Or use custom label IDs from gmail_list_email_labels"
},
"removeLabelIds" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "Labels to remove. Example: remove \" UNREAD \" to mark as read, remove \" INBOX \" to archive"
}
},
"required" : [
"PCID" ,
"messageId"
]
}
gmail_list_email_labels
List all Gmail labels (both system and custom). Returns label IDs needed for gmail_modify_email
Parameters:
Parameter Type Required Default Description labelIdsstring[] No — Filter to specific label IDs. Omit to get all labels
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"labelIds" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "Filter to specific label IDs. Omit to get all labels"
}
},
"required" : [
"PCID"
]
}
gmail_create_label
Create a new custom Gmail label for organizing emails. Returns the label ID for use with gmail_modify_email
Parameters:
Parameter Type Required Default Description namestring Yes — Label name. Can include ”/” for nested labels. Example: “Projects/Client-A” messageListVisibilitystring No — Show label in message list view. “show” = visible, “hide” = hidden. Default: show labelListVisibilitystring No — Show label in sidebar. “labelShow” = always, “labelShowIfUnread” = only when unread, “labelHide” = never
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"name" : {
"type" : "string" ,
"description" : "Label name. Can include \" / \" for nested labels. Example: \" Projects/Client-A \" "
},
"messageListVisibility" : {
"type" : "string" ,
"enum" : [
"show" ,
"hide"
],
"description" : "Show label in message list view. \" show \" = visible, \" hide \" = hidden. Default: show"
},
"labelListVisibility" : {
"type" : "string" ,
"enum" : [
"labelShow" ,
"labelShowIfUnread" ,
"labelHide"
],
"description" : "Show label in sidebar. \" labelShow \" = always, \" labelShowIfUnread \" = only when unread, \" labelHide \" = never"
}
},
"required" : [
"PCID" ,
"name"
]
}
gmail_update_label
Rename a label or change its visibility settings
Parameters:
Parameter Type Required Default Description idstring Yes — Label ID to update. Get from gmail_list_email_labels namestring No — New name for the label messageListVisibilitystring No — Show label in message list view labelListVisibilitystring No — Show label in sidebar
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"id" : {
"type" : "string" ,
"description" : "Label ID to update. Get from gmail_list_email_labels"
},
"name" : {
"type" : "string" ,
"description" : "New name for the label"
},
"messageListVisibility" : {
"type" : "string" ,
"enum" : [
"show" ,
"hide"
],
"description" : "Show label in message list view"
},
"labelListVisibility" : {
"type" : "string" ,
"enum" : [
"labelShow" ,
"labelShowIfUnread" ,
"labelHide"
],
"description" : "Show label in sidebar"
}
},
"required" : [
"PCID" ,
"id"
]
}
gmail_delete_label
Delete a custom label. Emails with this label are NOT deleted, only the label is removed from them
Parameters:
Parameter Type Required Default Description idstring Yes — Label ID to delete. Get from gmail_list_email_labels. Cannot delete system labels
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"id" : {
"type" : "string" ,
"description" : "Label ID to delete. Get from gmail_list_email_labels. Cannot delete system labels"
}
},
"required" : [
"PCID" ,
"id"
]
}
gmail_get_or_create_label
Get a label by name, creating it if it does not exist. Idempotent - safe to call multiple times
Parameters:
Parameter Type Required Default Description namestring Yes — Label name to find or create. Example: “Processed”, “To Review”, “Client/ProjectX”
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"name" : {
"type" : "string" ,
"description" : "Label name to find or create. Example: \" Processed \" , \" To Review \" , \" Client/ProjectX \" "
}
},
"required" : [
"PCID" ,
"name"
]
}
gmail_batch_modify_emails
Apply label changes to multiple emails at once. More efficient than calling gmail_modify_email repeatedly
Parameters:
Parameter Type Required Default Description messageIdsstring[] Yes — Array of message IDs to modify. Get from gmail_search_emails. Example: [“msg123”, “msg456”] addLabelIdsstring[] No — Labels to add to ALL messages. Example: [“STARRED”, “Label_123”] removeLabelIdsstring[] No — Labels to remove from ALL messages. Example: [“UNREAD”, “INBOX”] batchSizenumber No 50Messages per batch. Default: 50. Reduce if timeouts occur
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"messageIds" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "Array of message IDs to modify. Get from gmail_search_emails. Example: [ \" msg123 \" , \" msg456 \" ]"
},
"addLabelIds" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "Labels to add to ALL messages. Example: [ \" STARRED \" , \" Label_123 \" ]"
},
"removeLabelIds" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "Labels to remove from ALL messages. Example: [ \" UNREAD \" , \" INBOX \" ]"
},
"batchSize" : {
"type" : "number" ,
"default" : 50 ,
"description" : "Messages per batch. Default: 50. Reduce if timeouts occur"
}
},
"required" : [
"PCID" ,
"messageIds"
]
}
gmail_batch_delete_emails
Delete multiple Gmail messages by moving them to the trash using batch processing. Messages can be recovered from trash within 30 days.
Parameters:
Parameter Type Required Default Description messageIdsstring[] Yes — Array of message IDs to permanently delete. WARNING: Cannot be undone batchSizenumber No 50Messages per batch. Default: 50. Reduce if timeouts occur
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"messageIds" : {
"type" : "array" ,
"items" : {
"type" : "string"
},
"description" : "Array of message IDs to permanently delete. WARNING: Cannot be undone"
},
"batchSize" : {
"type" : "number" ,
"default" : 50 ,
"description" : "Messages per batch. Default: 50. Reduce if timeouts occur"
}
},
"required" : [
"PCID" ,
"messageIds"
]
}
gmail_archive_email
Archive an email (removes from inbox but keeps it accessible in All Mail). Email is NOT deleted
Parameters:
Parameter Type Required Default Description messageIdstring Yes — Gmail message ID to archive. Get from gmail_search_emails
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"messageId" : {
"type" : "string" ,
"description" : "Gmail message ID to archive. Get from gmail_search_emails"
}
},
"required" : [
"PCID" ,
"messageId"
]
}
gmail_trash_email
Move email to Trash. Can be recovered within 30 days.
Parameters:
Parameter Type Required Default Description messageIdstring Yes — Gmail message ID to trash. Get from gmail_search_emails
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"messageId" : {
"type" : "string" ,
"description" : "Gmail message ID to trash. Get from gmail_search_emails"
}
},
"required" : [
"PCID" ,
"messageId"
]
}
gmail_download_attachment
Download an email attachment and store it as an artifact. Returns a link to the stored file, metadata, and a text preview for supported types (PDF, DOCX, XLSX, PPTX). Get attachmentId from gmail_search_emails or gmail_read_email
Parameters:
Parameter Type Required Default Description messageIdstring Yes — Gmail message ID containing the attachment. Get from gmail_search_emails attachmentIdstring Yes — Attachment ID to download. Found in email attachments[].attachmentId from gmail_search_emails filenamestring No — Override filename for the attachment. If omitted, uses original filename mimeTypestring No — MIME type of the attachment (e.g. application/pdf). Get from gmail_search_emails attachments[].mimeType. Used for text extraction and storage
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"messageId" : {
"type" : "string" ,
"description" : "Gmail message ID containing the attachment. Get from gmail_search_emails"
},
"attachmentId" : {
"type" : "string" ,
"description" : "Attachment ID to download. Found in email attachments[].attachmentId from gmail_search_emails"
},
"filename" : {
"type" : "string" ,
"description" : "Override filename for the attachment. If omitted, uses original filename"
},
"mimeType" : {
"type" : "string" ,
"description" : "MIME type of the attachment (e.g. application/pdf). Get from gmail_search_emails attachments[].mimeType. Used for text extraction and storage"
}
},
"required" : [
"PCID" ,
"messageId" ,
"attachmentId"
]
}
gmail_list_trigger_capabilities
List available Gmail trigger types for automation. Used by the trigger configuration system
{
"type" : "object" ,
"properties" : {}
}
gmail_poll_trigger
Poll for new emails since last check. Used by automation triggers. Returns full email data including body and attachment info
Parameters:
Parameter Type Required Default Description querystring No — Filter emails with Gmail search syntax. Examples: “from:alerts@service.com ”, “subject:order”, “is:unread” labelIdsstring No — Filter to emails with this label ID. Get ID from gmail_list_email_labels includeSpamTrashboolean No — Include spam/trash emails. Default: false cursorstring No — Gmail historyId from previous poll. Pass this to get only NEW emails since last poll minTimestampnumber No — Unix timestamp (seconds). Ignore emails before this time. Typically set to trigger creation time maxResultsnumber No — Limit number of emails returned. Default: 100
{
"type" : "object" ,
"properties" : {
"PCID" : {
"type" : "string" ,
"description" : "Pink Connect ID for Gmail connection"
},
"query" : {
"type" : "string" ,
"description" : "Filter emails with Gmail search syntax. Examples: \" from:alerts@service.com \" , \" subject:order \" , \" is:unread \" "
},
"labelIds" : {
"type" : "string" ,
"description" : "Filter to emails with this label ID. Get ID from gmail_list_email_labels"
},
"includeSpamTrash" : {
"type" : "boolean" ,
"description" : "Include spam/trash emails. Default: false"
},
"cursor" : {
"type" : "string" ,
"description" : "Gmail historyId from previous poll. Pass this to get only NEW emails since last poll"
},
"minTimestamp" : {
"type" : "number" ,
"description" : "Unix timestamp (seconds). Ignore emails before this time. Typically set to trigger creation time"
},
"maxResults" : {
"type" : "number" ,
"description" : "Limit number of emails returned. Default: 100"
}
},
"required" : [
"PCID"
]
}