> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noxus.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Workspace

> Connect to Google services with OAuth authentication

Noxus integrates with Google Workspace services using OAuth 2.0 authentication, allowing you to access Gmail, Drive, Sheets, Docs, Calendar, and more.

## Supported Google Services

| Service             | Authentication | Key Capabilities                                    |
| :------------------ | :------------- | :-------------------------------------------------- |
| **Gmail**           | OAuth 2.0      | Send/receive emails, read threads, manage labels    |
| **Google Drive**    | OAuth 2.0      | Upload/download files, folder management, sharing   |
| **Google Sheets**   | OAuth 2.0      | Read/write data, create sheets, manage workbooks    |
| **Google Docs**     | OAuth 2.0      | Create/edit documents, export formats               |
| **Google Calendar** | OAuth 2.0      | Create events, manage calendars, check availability |

***

## Authentication: OAuth 2.0

### Description

Google integrations use OAuth 2.0 to authenticate as a specific user. Users grant permission through Google's consent screen, and Noxus can then access the resources that user has permission to view or modify.

### When to Use

<CardGroup cols={2}>
  <Card title="Ideal For" icon="circle-check">
    * User-specific actions (sending email as a user)
    * Personal file access
    * Individual calendar management
    * Actions requiring user attribution
  </Card>

  <Card title="Characteristics" icon="info">
    * **Permission Type**: User-delegated
    * **Setup**: Interactive consent flow
    * **Access Scope**: User's accessible resources
    * **Best For**: Personal automation, user workflows
  </Card>
</CardGroup>

### Authentication Flow

```mermaid theme={null}
sequenceDiagram
    participant U as User
    participant NF as Noxus Frontend
    participant G as Google OAuth
    participant NB as Noxus Backend
    participant GA as Google API

    Note over U,GA: Initial Setup
    U->>NF: Click "Connect Google Service"
    NF->>G: Redirect to Google consent screen
    G->>U: Display permission request
    U->>G: Approve permissions
    G->>NF: Return authorization code
    NF->>NB: Complete connection
    NB->>NB: Store tokens securely

    Note over U,GA: When running a flow...
    NB->>G: Request/refresh access token
    G->>NB: Return valid token
    NB->>GA: API request with token
    GA->>NB: Return data
```

## Setup Process

<Steps>
  <Step title="Navigate to Integrations">
    Go to Integrations in your Noxus workspace
  </Step>

  <Step title="Select Google Service">
    Choose the Google service (Gmail, Drive, Sheets, Docs, or Calendar)
  </Step>

  <Step title="Click Connect">
    Click the Connect button
  </Step>

  <Step title="Sign In">
    Sign in with your Google account
  </Step>

  <Step title="Review Permissions">
    Review the requested permissions carefully
  </Step>

  <Step title="Grant Access">
    Click "Allow" to grant permissions
  </Step>

  <Step title="Complete">
    Connection is active and ready to use in flows
  </Step>
</Steps>

***

## Permissions by Service

<AccordionGroup>
  <Accordion title="Gmail" icon="mail">
    **Scopes Required:**

    * `gmail.readonly` - Read email and settings
    * `gmail.send` - Send email on your behalf
    * `gmail.modify` - Manage drafts and send email

    **Capabilities:**

    * Read emails and threads
    * Send emails
    * Create and manage labels
    * Search messages
    * Manage drafts
  </Accordion>

  <Accordion title="Google Drive" icon="hard-drive">
    **Scopes Required:**

    * `drive.readonly` - View files and folders
    * `drive.file` - View and manage files created by Noxus
    * `drive` - Full Drive access

    **Capabilities:**

    * Upload and download files
    * Create and manage folders
    * Share files and folders
    * Search Drive
    * Manage permissions
  </Accordion>

  <Accordion title="Google Sheets" icon="table">
    **Scopes Required:**

    * `spreadsheets.readonly` - View spreadsheets
    * `spreadsheets` - Create and edit spreadsheets

    **Capabilities:**

    * Read sheet data
    * Write data to cells
    * Create new sheets
    * Format cells
    * Manage worksheets
  </Accordion>

  <Accordion title="Google Docs" icon="file-text">
    **Scopes Required:**

    * `documents.readonly` - View documents
    * `documents` - Create and edit documents

    **Capabilities:**

    * Read document content
    * Create new documents
    * Edit existing documents
    * Export to different formats
  </Accordion>

  <Accordion title="Google Calendar" icon="calendar">
    **Scopes Required:**

    * `calendar.readonly` - View calendars
    * `calendar.events` - Manage events
    * `calendar` - Full calendar access

    **Capabilities:**

    * Create calendar events
    * Read event details
    * Update events
    * Check availability
    * Manage calendars
  </Accordion>
</AccordionGroup>

***

## Common Use Cases

<Tabs>
  <Tab title="Gmail Automation">
    **Email Processing Workflows:**

    * Monitor inbox for specific emails
    * Automatically respond to inquiries
    * Extract data from email attachments
    * Route emails based on content
    * Send bulk personalized emails

    **Example Flow:**

    ```mermaid theme={null}
    graph LR
        A[Email Received] --> B[Extract Attachment]
        B --> C[Process Document]
        C --> D[Send Reply]
    ```
  </Tab>

  <Tab title="Drive Sync">
    **File Management:**

    * Sync files to knowledge bases
    * Backup important documents
    * Process uploaded files
    * Generate and upload reports
    * Share files automatically

    **Example Flow:**

    ```mermaid theme={null}
    graph LR
        A[Schedule Trigger] --> B[Fetch from Drive]
        B --> C[Process Files]
        C --> D[Upload to KB]
    ```
  </Tab>

  <Tab title="Sheets Integration">
    **Data Workflows:**

    * Export data to Sheets
    * Import data for processing
    * Generate reports
    * Update tracking sheets
    * Analyze spreadsheet data

    **Example Flow:**

    ```mermaid theme={null}
    graph LR
        A[Data Source] --> B[Transform Data]
        B --> C[Write to Sheets]
        C --> D[Notify Team]
    ```
  </Tab>

  <Tab title="Calendar Automation">
    **Event Management:**

    * Schedule meetings automatically
    * Check availability
    * Send calendar invites
    * Sync events across systems
    * Automated reminders

    **Example Flow:**

    ```mermaid theme={null}
    graph LR
        A[New Request] --> B[Check Availability]
        B --> C[Create Event]
        C --> D[Send Invite]
    ```
  </Tab>
</Tabs>

***

## Security Best Practices

<CardGroup cols={2}>
  <Card title="Permission Management" icon="shield">
    * Request only necessary scopes
    * Regularly review connected apps
    * Remove unused connections
    * Monitor access logs
  </Card>

  <Card title="Token Security" icon="key">
    * Tokens stored encrypted
    * Automatic token refresh
    * Revoke access when needed
    * Audit token usage
  </Card>
</CardGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection Failed" icon="circle-x">
    **Possible Causes:**

    * Invalid Google account
    * Permissions not granted
    * OAuth flow interrupted
    * Network connectivity issues

    **Solutions:**

    * Try reconnecting with a different account
    * Ensure all permissions are approved
    * Complete the OAuth flow without closing windows
    * Check network connection
  </Accordion>

  <Accordion title="Permission Denied" icon="shield-x">
    **Possible Causes:**

    * Missing required scopes
    * User revoked access
    * Resource access restrictions
    * Admin disabled app access

    **Solutions:**

    * Reconnect to grant additional scopes
    * Check Google account permissions
    * Verify resource sharing settings
    * Contact Google Workspace admin
  </Accordion>

  <Accordion title="Quota Exceeded" icon="gauge">
    **Possible Causes:**

    * API rate limits reached
    * Too many concurrent requests
    * Daily quota exceeded

    **Solutions:**

    * Implement rate limiting in flows
    * Reduce request frequency
    * Use batch operations when available
    * Upgrade Google Workspace plan if needed
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={3}>
  <Card title="Microsoft 365" icon="building" href="/integrations/providers/microsoft">
    Connect Outlook, Teams, and OneDrive
  </Card>

  <Card title="Atlassian" icon="trello" href="/integrations/providers/atlassian">
    Integrate Jira and Confluence
  </Card>

  <Card title="All Integrations" icon="blocks" href="/integrations/catalog">
    Browse the complete catalog
  </Card>
</CardGroup>
