Supyagent
Cloud IntegrationsProviders

Google

Connect Gmail, Google Calendar, and Google Drive to your agents via Supyagent Cloud.

Google Integration

Google provides access to three services: Gmail, Google Calendar, and Google Drive. Your agents can read and send emails, manage calendar events, and search or upload files.

OAuth Setup

When you click Connect Google on the dashboard, Supyagent requests the following scopes:

ScopeServiceAccess
gmail.readonlyGmailRead and search emails
gmail.sendGmailSend emails
calendar.readonlyCalendarView events and availability
calendar.eventsCalendarCreate, update, and delete events
drive.readonlyDriveView and download files
drive.fileDriveUpload, create, and organize files
userinfo.emailProfileRead your email address (for identification)

Permissions

Permission IDNameTypeDescription
gmail.readRead emailsreadView and search your emails
gmail.sendSend emailswriteSend emails on your behalf
calendar.readRead calendarreadView your calendar events and availability
calendar.writeManage eventswriteCreate, update, and delete calendar events
drive.readRead filesreadView and download your files and folders
drive.writeManage fileswriteUpload, create, and organize files

Gmail

Example Actions

List recent emails:

curl -X GET "https://app.supyagent.com/api/v1/google/gmail/messages?limit=10" \
  -H "Authorization: Bearer sk_live_..."

Search emails:

curl -X GET "https://app.supyagent.com/api/v1/google/gmail/messages?q=from:boss@company.com" \
  -H "Authorization: Bearer sk_live_..."

Send an email:

curl -X POST "https://app.supyagent.com/api/v1/google/gmail/send" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "to": "alice@example.com",
    "subject": "Meeting notes",
    "body": "Here are the notes from today..."
  }'

What Agents Can Do

  • Search emails by sender, subject, date range, labels
  • Read email bodies and attachments
  • Send new emails and reply to threads
  • List labels and organize messages

Google Calendar

Example Actions

List upcoming events:

curl -X GET "https://app.supyagent.com/api/v1/google/calendar/events?days=7" \
  -H "Authorization: Bearer sk_live_..."

Create an event:

curl -X POST "https://app.supyagent.com/api/v1/google/calendar/events" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "summary": "Team standup",
    "start": "2025-03-15T09:00:00-07:00",
    "end": "2025-03-15T09:30:00-07:00",
    "attendees": ["bob@example.com"]
  }'

What Agents Can Do

  • List events for any date range
  • Check availability / free-busy information
  • Create, update, and cancel events
  • Add attendees and set reminders

Google Drive

Example Actions

Search files:

curl -X GET "https://app.supyagent.com/api/v1/google/drive/files?q=quarterly+report" \
  -H "Authorization: Bearer sk_live_..."

Download a file:

curl -X GET "https://app.supyagent.com/api/v1/google/drive/files/{fileId}/content" \
  -H "Authorization: Bearer sk_live_..."

What Agents Can Do

  • Search files by name, type, or content
  • List files in specific folders
  • Download file contents
  • Upload new files
  • Create and organize folders

Notes

  • Google OAuth tokens expire after 1 hour but are automatically refreshed using the refresh token
  • The drive.file scope only grants access to files created or opened by the app -- use drive.readonly for broader read access
  • Gmail search uses the same query syntax as the Gmail search bar (e.g., from:alice subject:report after:2025/01/01)