Google Workspace Integration
Sutra integrates deeply with Google Workspace — giving your agents the ability to read and index documents from Google Drive, schedule and manage Calendar events, and handle Gmail triage and replies. Connect once with OAuth, and your agents have secure, scoped access to the tools your team already lives in.
Setup (OAuth Credentials)
All Google Workspace integrations require a centralized OAuth Client ID.
- Go to the Google Cloud Console.
- Create a new Project (e.g., "Sutra Agents").
- Navigate to APIs & Services > Credentials.
- Click Create Credentials > OAuth client ID.
- Choose Web application as the application type.
- Under Authorized redirect URIs, add your Sutra callback URL (e.g.,
https://sutra.mycompany.com/api/auth/google/callback). - Save the Client ID and Client Secret.
In Sutra, navigate to Settings > Configuration (Integrations group) and add:
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret
1. Google Drive Integration
Allow your agents to use your Google Drive as a living Knowledge Base.
Configuration
- In Google Cloud Console, enable the Google Drive API.
- In Sutra, navigate to the Google Drive page (
/google-drive). - Click Connect Google Drive and authenticate with your Google account.
- Select the specific Folders or Shared Drives you want Sutra to have access to.
How it Works
Sutra will periodically sync the selected folders. Supported files (Google Docs, Sheets, Slides, and PDFs) are downloaded, chunked, and embedded into Sutra's pgvector knowledge base. When an agent uses the search_knowledge_base tool, it will retrieve accurate, up-to-date information directly from your Drive.
Supported file types include Google Docs, Sheets, Slides, PDFs, and plain text files. Google Sheets are converted to structured data with headers preserved, making them ideal for product catalogs, price lists, and FAQ databases that agents need to query precisely.
2. Google Calendar Integration
Enable your agents to schedule meetings, check availability, and manage your calendar.
Configuration
- In Google Cloud Console, enable the Google Calendar API.
- Equip your agent with the
google_calendartoolset in the Agent settings.
Agent Capabilities
With this integration, an agent can:
- Check Availability: "Does the engineering team have time for a meeting tomorrow afternoon?" (The agent will query the calendars and find an open slot).
- Create Events: "Schedule a 30-minute sync with Sarah on Friday at 10 AM." (The agent will create the event and send invites).
- Modify/Cancel: "Push my 10 AM meeting back by 30 minutes."
- Recurring Events: "Set up a weekly team standup every Monday at 9 AM for the next quarter." The agent handles the recurrence rules and sends invites to all specified attendees.
- Smart Scheduling: "Find a 45-minute slot next week when both Sarah and Mike are free." The agent cross-references multiple calendars and suggests the best options, factoring in time zones if your team is distributed.
Calendar actions are logged in the audit trail, so you can always see which agent scheduled (or moved) a meeting and why. For sensitive calendars, you can require human approval before any event is created or modified.
3. Gmail Integration
While Sutra supports standard SMTP, the native Gmail integration offers a more robust way for agents to handle email.
Configuration
- In Google Cloud Console, enable the Gmail API.
- Equip your agent with the
gmail_readandgmail_sendtools.
Agent Capabilities
- Triage: Agents can read incoming emails, classify them (e.g., "Support", "Sales", "Spam"), and apply Gmail labels automatically.
- Drafting: An agent can read an incoming client email, draft a response, and save it to your Drafts folder for your review before sending.
- Autonomous Replies: For trusted workflows, agents can autonomously reply to specific types of inquiries directly via Gmail.
- Thread Management: Agents understand email threads — they read the full conversation history before responding, ensuring replies are contextually accurate even in long email chains.
- Attachment Handling: Agents can read PDF and document attachments by indexing them on the fly, and attach files from the Knowledge Base when composing outbound emails.