Suger

Google Mail

Overview

Gmail, Google’s email service, offers a comprehensive platform for communication and productivity. With features like advanced search capabilities, powerful filters, and seamless integration with other Google Workspace tools, Gmail is a cornerstone of modern email management.

By integrating Suger with Gmail, users can leverage automation workflows to enhance email productivity. Tasks such as sending emails, applying labels for organization, and managing threads can be automated, improving efficiency and enabling customized email workflows tailored to specific needs.

Org-Level vs User-Level

When to use Org-Level: Use org-level integration when you want all users in your organization to have access to Gmail data through a shared service account. Best for company-wide data access.

When to use User-Level: Use user-level integration when each user needs to connect their personal Google Mail account. Each user authenticates with their own credentials.

Create Integration (Org-Level)

  1. Click the Connect Now button, select OAuth2.0 as the authentication method, and click Create. You will be redirected to the Google OAuth2.0 authentication page.
  1. Click the Allow button to grant Suger permission to access your Gmail account. This authorization enables Suger to send emails on your behalf.
  1. After the authorization is granted, you will be redirected to the Suger console. You can see the integration is connected successfully.

  2. Verify the integration by clicking the Verify button. If the integration is successful, you will see the Verified status.

Authenticate by a Service Account

  1. Create a service account in your target GCP project for Google Mail integration.

  2. Enable the Gmail API in the same Google project.

  3. Create the service account key, and download the associated JSON file. It is required for the following integration.

  4. Enable G-Suite Domain-wide Delegation for the service account.

  5. Specify the impersonated email address, select the appropriate scopes configured in the previous step, and store the JSON key file contents within the Suger console integration page.

Create User Integration

  1. Click Connect Now button in the User Integrations section, you will be redirected to the Google OAuth2.0 authentication page.

Google Mail Connect Now

  1. Click the Allow button to grant Suger permission to access your Google mail account. This authorization enables Suger to read and send emails on your behalf.

Google Mail User Consent

  1. After the authorization is granted, you will be redirected to the Suger console. You can see the integration is connected successfully.

  2. Verify the integration by clicking the Verify button. If the integration is successful, you will see the Verified status.

Suger AI Tools

Suger AI uses a middleware strategy — wrapping the Gmail API directly.

Org-level and user-level: Both integration levels are supported. User-level takes precedence when both are connected.

Profile & Labels

ToolDescription
googlemail_get_profileGet the authenticated user’s Gmail profile
googlemail_list_labelsList all Gmail labels (system and user-created)

Messages

ToolDescription
googlemail_list_messagesList messages using Gmail search syntax
googlemail_get_messageGet a message (headers by default)
googlemail_get_message_bodyGet a message with fully decoded body (plain text + HTML)
googlemail_send_mailSend an email (plain text, HTML, or threaded reply)
googlemail_reply_to_messageReply to a message, preserving thread
googlemail_modify_message_labelsAdd or remove labels on a message
googlemail_batch_modify_messagesApply label changes to up to 1,000 messages at once
googlemail_get_attachmentDownload a message attachment
googlemail_trash_messageMove a message to Trash
googlemail_untrash_messageRestore a trashed message

Threads

ToolDescription
googlemail_list_threadsList conversation threads
googlemail_get_threadGet all messages in a thread
googlemail_modify_thread_labelsAdd or remove labels on an entire thread
googlemail_trash_threadTrash an entire thread
googlemail_untrash_threadRestore a trashed thread

Drafts

ToolDescription
googlemail_list_draftsList drafts
googlemail_create_draftSave an email as a draft
googlemail_get_draftGet a draft
googlemail_update_draftReplace a draft’s content
googlemail_send_draftSend a previously saved draft
googlemail_delete_draftPermanently delete a draft

Edit Integration

Editing is not supported for security reasons. To change configuration, delete the integration and create a new one.

Delete Integration

The Google Mail integration can be deleted like all other integrations. Once the deletion is triggered, all integration info including the service account with the key will be deleted immediately & permanently from Suger. No time window or methods to recover.