Overview

Google’s email service for sending, receiving, and managing emails. Through Langdock’s integration, you can access and manage Gmail directly from your conversations.
Authentication: OAuth
Category: Google Workspace
Availability: All workspace plans

Available Actions

Create Email Draft

gmail.createEmailDraft
Creates a draft email in your Gmail account without sending it Requires Confirmation: Yes Parameters:
  • mailRecipient (TEXT, Required): Email address of the person you want to send the email to
    • mailSubject (TEXT, Optional): Subject line for the email draft
    • mailBody (MULTI_LINE_TEXT, Optional): Main content of the email draft. Provide HTML-formatted content with proper tags: use <b> for bold text, <i> for italic text, <ul><li> for bullet lists, <ol><li> for numbered lists, and <br> for line breaks. Example: <b>Important:</b> This is a <i>test</i> email.<br><br>Features:<ul><li>First item</li><li>Second item</li></ul>
    • cc (TEXT, Optional): Email addresses to carbon copy on this reply. Multiple addresses should be separated by commas, for example: mats@acme.com, jonas@acme.com
    • bcc (TEXT, Optional): Email addresses to blind carbon copy on this reply. Recipients won’t see who was BCC’d. Multiple addresses should be separated by commas, for example: mats@acme.com, jonas@acme.com
    • attachments (FILE, Optional): Files to attach to the draft
Output: Returns the created draft with its ID and details

Reply to Email

gmail.replytoEmail
Creates and immediately sends an email from your Gmail account Requires Confirmation: Yes Parameters:
  • mailSubject (TEXT, Required): Subject line for the email
    • mailRecipient (TEXT, Required): Email address of the person you want to send the email to
    • mailBody (MULTI_LINE_TEXT, Required): Main content of the email. Provide HTML-formatted content with proper tags: use <b> for bold text, <i> for italic text, <ul><li> for bullet lists, <ol><li> for numbered lists, and <br> for line breaks. Example: <b>Important:</b> This is a <i>test</i> email.<br><br>Features:<ul><li>First item</li><li>Second item</li></ul>
    • threadId (TEXT, Required): The unique identifier of the email thread you want to send a reply to
    • cc (TEXT, Optional): Email addresses to carbon copy on this reply. Multiple addresses should be separated by commas, for example: mats@acme.com, jonas@acme.com
    • bcc (TEXT, Optional): Email addresses to blind carbon copy on this reply. Recipients won’t see who was BCC’d. Multiple addresses should be separated by commas, for example: mats@acme.com, jonas@acme.com
    • attachments (FILE, Optional): Files to attach to the reply
Output: Returns the sent email with its ID and details

Send Email

gmail.sendEmail
Creates and immediately sends an email from your Gmail account Requires Confirmation: Yes Parameters:
  • mailSubject (TEXT, Required): Subject line for the email
    • mailRecipient (TEXT, Required): Email address of the person you want to send the email to
    • mailBody (MULTI_LINE_TEXT, Required): Main content of the email. Provide HTML-formatted content with proper tags: use <b> for bold text, <i> for italic text, <ul><li> for bullet lists, <ol><li> for numbered lists, and <br> for line breaks. Example: <b>Important:</b> This is a <i>test</i> email.<br><br>Features:<ul><li>First item</li><li>Second item</li></ul>
    • cc (TEXT, Optional): Email addresses to carbon copy on this reply. Multiple addresses should be separated by commas, for example: mats@acme.com, jonas@acme.com
    • bcc (TEXT, Optional): Email addresses to blind carbon copy on this reply. Recipients won’t see who was BCC’d. Multiple addresses should be separated by commas, for example: mats@acme.com, jonas@acme.com
    • attachments (FILE, Optional): Files to attach to the email
Output: Returns the sent email with its ID and details

Search Emails

gmail.searchEmails
Searches through your Gmail inbox and returns emails matching your search criteria Requires Confirmation: No Parameters:
  • filter (TEXT, Optional): Search term to find specific emails. You can search by sender, recipient, subject, or content within the email body. Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, 'from:someuser@example.com rfc822msgid:<somemsgid@example.com> is:unread’. Please only set this field, if you really need to filter the emails. If you just want the latest, leave it empty.
Output: Returns search results with the following structure:
  • message: Summary message about the search results
  • emails: Array of email objects containing:
    • messageId: Email message ID
    • threadId: Email thread ID
    • subject: Email subject
    • date: Email date
    • from: Sender information
    • to: Recipient information
    • snippet: Email snippet
    • body: Email body content
    • hasAttachments: Whether the email has attachments
    • attachmentCount: Number of attachments

Get Email with Attachments

gmail.getEmailwithAttachments
Retrieves a single email thread or message with full content including attachments. Returns all messages in the thread and their attachment files. Requires Confirmation: No Parameters:
  • threadId (TEXT, Optional): The unique identifier of the email thread to retrieve. Either threadId or messageId is required.
    • messageId (TEXT, Optional): The unique identifier of a specific email message to retrieve. Either threadId or messageId is required.
Output: Returns the email thread or message with full content and attachments

Create Draft Reply

gmail.createDraftReply
Creates a draft reply for an email. Requires Confirmation: Yes Parameters:
  • threadId (TEXT, Required): The id of the thread where the message is in that should be answered.
    • replyContent (MULTI_LINE_TEXT, Required): The email content that should be the content of the draft. Provide HTML-formatted content with proper tags: use <b> for bold text, <i> for italic text, <ul><li> for bullet lists, <ol><li> for numbered lists, and <br> for line breaks. Example: <b>Important:</b> This is a <i>test</i> email.<br><br>Features:<ul><li>First item</li><li>Second item</li></ul>
    • to (TEXT, Optional): Email address of the recipient. If left empty, the reply will be sent to the sender of the last message in the thread. Multiple addresses should be separated by commas, for example: mats@acme.com, karl@acme.com
    • cc (TEXT, Optional): Email addresses to carbon copy on this reply. Multiple addresses should be separated by commas, for example: mats@acme.com, jonas@acme.com
    • bcc (TEXT, Optional): Email addresses to blind carbon copy on this reply. Recipients won’t see who was BCC’d. Multiple addresses should be separated by commas, for example: mats@acme.com, jonas@acme.com
    • attachments (FILE, Optional): Files to attach to the draft reply
Output: Returns the created draft reply with its ID and details

Triggers


New Email

gmail.newEmail
Triggers when a new email is received in your inbox (sent emails are excluded) Requires Confirmation: No Parameters: None Output: Returns information about newly received emails
gmail.newEmailMatchingSearch
Triggers when new emails matching your search query are received (sent emails excluded unless you add ‘in:sent’) Requires Confirmation: No Parameters:
  • searchQuery (TEXT, Required): Google search query to filter emails. Examples: ‘from:johndoe@example.com’, ‘subject:Important’, ‘has:attachment’. Sent emails are automatically excluded unless you include ‘in:sent’ in your query
Output: Returns information about emails matching the search criteria

Common Use Cases

Data Management

Manage and organize your Gmail data

Automation

Automate workflows with Gmail

Reporting

Generate insights and reports

Integration

Connect Gmail with other tools

Best Practices

Getting Started:
  1. Enable the Gmail integration in your workspace settings
  2. Authenticate using OAuth
  3. Test the connection with a simple read operation
  4. Explore available actions for your use case
Important Considerations:
  • Ensure proper authentication credentials
  • Respect rate limits and API quotas
  • Review data privacy settings
  • Test operations in a safe environment first

Troubleshooting

IssueSolution
Authentication failedVerify your OAuth credentials
Rate limit exceededReduce request frequency
Data not foundCheck permissions and data availability
Connection timeoutVerify network connectivity

Support

For additional help with the Gmail integration, contact support@langdock.com