Skip to main content

Gmail Integration - Setup Guide

Connect your Gmail account to Goodweek to read, send, and manage emails directly from your AI workspace.

A
Written by Antoine Stempien

Connect your Gmail account to Goodweek to read, send, and manage emails directly from your AI workspace.

ℹ️ Governance note

Goodweek will never exceed the access levels granted to the user within Gmail, guaranteeing alignment with your organization's governance policies. Outcomes and available features may vary depending on each user's specific permissions and authenticated access.

📋 Prerequisites

Before any user can see and connect the Gmail integration, your organization admin must first enable it from the Goodweek Admin Panel under the Integrations tab.

Admin Setup

Personal Google accounts (@gmail.com)

No admin setup required. Connect directly following the User Connection steps below.

Google Workspace accounts (work or school)

Depending on your organization's API access policy, one of the following scenarios may apply.

Scenario 1 — Default (unrestricted third-party access)

Any user can connect directly without admin intervention.

Scenario 2 — Third-party access is restricted (admin_policy_enforced error)

A Google Workspace Super Admin must mark Composio as a trusted app:

  1. Log in to admin.google.com as a Super Admin.

  2. Go to Security → Access and data control → API controls → Manage Third-Party App Access.

  3. Click Configure new app, search for Composio, select it, set access to Trusted, and click Save.

Scenario 3 — All third-party API access is blocked

Go to admin.google.com → Security → API controls and review the "Third-party app access to Google APIs" setting. If blocked, the admin must create an exception for Composio before following Scenario 2.

User Connection

  1. In Goodweek, go to Integrations.

  2. Find Gmail and click Connect.

  3. You will be redirected to Google, where you will be asked to sign in.

  4. Review the requested permissions and click Allow to return to Goodweek.

Important Notes

  • Each user must connect their own account individually.

  • Goodweek can only access the emails and data that your individual user account has access to.

  • If you have multiple Google accounts, make sure you select the correct one during the connection step. Google may automatically pre-select the last account you used.

  • Gmail OAuth tokens can be invalidated if your Google Workspace admin changes session length or API access policies. If the integration stops working unexpectedly, try disconnecting and reconnecting.

  • You can revoke Goodweek's access at any time from myaccount.google.com → Security → Third-party apps with account access.


Available Tools

Tool

Description

Type

Send Email

Sends an email immediately via the Gmail API using the authenticated user's display name.

Write

Reply to Email Thread

Sends a reply within a specific Gmail thread, preserving the original subject and thread context.

Write

Forward Email Message

Forwards an existing Gmail message to specified recipients, preserving the original body and attachments.

Write

Create Email Draft

Creates a Gmail draft without sending it, for review before sending.

Write

Update Draft

Replaces an existing Gmail draft's content in-place by draft ID.

Write

Send Draft

Sends an existing draft email as-is to its defined recipients.

Write

Get Draft

Retrieves a single Gmail draft by its ID.

Read

List Drafts

Retrieves a paginated list of email drafts from the user's Gmail account.

Read

Fetch Emails

Fetches a list of email messages from a Gmail account with filtering, pagination, and optional full content retrieval.

Read

Fetch Message by Message ID

Fetches a specific email message by its ID.

Read

Fetch Message by Thread ID

Retrieves all messages from a Gmail thread by its thread ID.

Read

List Threads

Retrieves a list of email threads from a Gmail account with filtering and pagination.

Read

Get Gmail Attachment

Retrieves a specific attachment from a Gmail message by its attachment ID.

Read

Get Profile

Retrieves Gmail profile information including email address and mailbox statistics.

Read

Get Contacts

Fetches contacts for the authenticated Google account with optional field selection and pagination.

Read

Search People

Searches contacts by matching a query against names, emails, phone numbers, and organizations.

Read

Modify Email Labels

Adds or removes Gmail labels from a specific message.

Write

Batch Modify Gmail Messages

Modifies labels on up to 1,000 Gmail messages in one API call.

Write

Create Label

Creates a new Gmail label with a unique name in the user's account.

Write

List Gmail Labels

Retrieves all system and user-created labels for a Gmail account.

Read

Create Gmail Filter

Creates a new Gmail filter with specified criteria and actions to organize incoming email.

Write

List Gmail Filters

Lists all Gmail filters (rules) in the mailbox.

Read

Get Vacation Settings

Retrieves vacation responder settings to check if out-of-office auto-replies are active.

Read

Update Vacation Settings

Configures out-of-office auto-reply settings for a Gmail user.

Write

Move to Trash

Moves an email message to the trash (recoverable).

⚠️ Destructive

Trash Thread

Moves an entire email thread and all its messages to the trash.

⚠️ Destructive

Batch Delete Gmail Messages

Permanently deletes multiple Gmail messages in bulk, bypassing the trash with no recovery possible.

⚠️ Destructive

Delete Thread

Permanently and immediately deletes a thread and all its messages. This action cannot be undone.

⚠️ Destructive

Use Cases

  • Send and reply to emails from Goodweek. Compose, send, and reply to Gmail messages directly within a Goodweek conversation, keeping email communication in context with the work you're already doing.

  • Read and surface relevant emails on demand. Search your inbox by sender, subject, or keywords to retrieve specific emails and bring them into a Goodweek conversation for review or reference.

  • Draft emails for review before sending. Create email drafts in Gmail through Goodweek, then review and send them at the right moment — useful when you need to prepare communications in advance.

  • Manage your inbox organisation. Apply labels to emails, create Gmail filters for incoming mail, or move messages to trash from Goodweek to keep your inbox structured without switching to the Gmail UI.


Troubleshooting

"Error 400: admin_policy_enforced" when connecting

This is the most common issue for Google Workspace users. Only a Google Workspace Super Admin can resolve this by following Scenario 2 above.

Admin marked Composio as Trusted but the error still appears

There may be a propagation delay. Wait a few minutes and try again. If the error persists, verify the correct Composio app was selected and that the access level was saved as Trusted and not Limited.

Connected the wrong Google account

Disconnect the integration from Goodweek and reconnect. Click "Use a different account" during the Google authentication step, or open an incognito browser window to avoid automatic account selection.

Integration stopped working after connecting successfully

Your Google Workspace admin may have changed API access policies. Try disconnecting and reconnecting. If the problem persists, ask your admin to verify that Composio is still marked as Trusted.

Integration not visible in Goodweek

Make sure your organization admin has enabled the Gmail integration from the Goodweek Admin Panel under the Integrations tab.

References

Did this answer your question?