Skip to main content

Gmail Integration

Let XY watch the Gmail folders you care about, capture important emails, and send polished replies on your behalf.

Overview

The Gmail integration connects XY to your Gmail account, enabling workflows and agents to read emails, monitor specific folders, send replies, and manage attachments. This integration is ideal for automating email-based workflows, patient communication, and document processing.

Authentication & Setup

  1. Navigate to the Integrations section in the XY Web App
  2. Select Gmail from the integration directory
  3. Click "Connect" and complete the OAuth authentication flow
  4. Grant XY the necessary permissions to access your Gmail account
  5. Configure which Gmail folders/labels XY should monitor

Post-Authentication Configuration

After connecting, configure:

  • Folder/Label Selection: Choose which Gmail folders or labels XY should monitor
  • Sync Frequency: Set how often XY checks for new emails (real-time, every 5 minutes, hourly, etc.)
  • Email Filters: Optionally filter by sender, subject patterns, or keywords
  • Attachment Handling: Configure how attachments should be processed

Endpoints & Capabilities

Read Operations

  • List Emails: Retrieve emails from specified folders/labels
  • Get Email: Fetch full email content including headers, body, and metadata
  • Search Emails: Query emails by sender, subject, date range, or keywords
  • Get Attachments: Download email attachments
  • Get Threads: Retrieve email conversation threads

Write Operations

  • Send Email: Compose and send new emails
  • Reply to Email: Send replies to existing email threads
  • Forward Email: Forward emails to specified recipients
  • Mark as Read/Unread: Update email read status
  • Apply Labels: Add or remove Gmail labels
  • Archive/Delete: Archive or delete emails

Configuration

  • Set Sync Frequency: Configure how often to check for new emails
  • Manage Folder Access: Add or remove folders/labels from monitoring
  • Configure Filters: Set up email filtering rules
  • Attachment Settings: Configure attachment download and processing options

Use Cases

  • Patient Communication: Automatically capture patient emails and route to appropriate workflows
  • Document Processing: Extract attachments from emails and process them in workflows
  • Email Automation: Send automated replies, confirmations, or notifications
  • Inbox Management: Automatically organize, label, or archive emails based on rules