Skip to main content

Google Workspace

OpenCompany ships seven Google Workspace nodes that share a single Google sign-in: connect once and every node below authenticates through the same stored OAuth tokens. Six of them are dual-purpose — drop them on the canvas as workflow steps, or wire them to an AI Agent’s tools handle and the agent can call them directly (tool names google_gmail, google_calendar, google_drive, google_sheets, google_tasks, google_contacts).

Connect your Google account

OpenCompany does not ship a shared Google app. You create your own OAuth client in Google Cloud Console (free), then paste its Client ID and Client Secret into OpenCompany. You only do this once.
Plan for roughly 15-20 minutes the first time through. Because your OAuth client is brand new, Google shows an “unverified app” warning screen during sign-in — this is expected for a personal client and safe to proceed through, since the app is your own. Adding your own Google account as a test user (step 3) is what lets you continue past it.
1

Create a Google Cloud project

Go to console.cloud.google.com and create a new project (any name works).
2

Enable six APIs

In APIs & Services → Library, enable each of: Gmail API, Google Calendar API, Google Drive API, Google Sheets API, Google Tasks API, and People API (the People API backs the Contacts node).
3

Configure the OAuth consent screen

In APIs & Services → OAuth consent screen, choose the External user type, fill in the required app fields, and add your own Google account as a Test User. Test-user status is what lets you sign in to an unverified app.
4

Create an OAuth client ID

In APIs & Services → Credentials, create an OAuth client ID of type Web application. Add this authorized redirect URI, exactly as written:
Copy the generated Client ID and Client Secret.
5

Connect OpenCompany

In OpenCompany, click the key icon to open API Credentials, select Google Workspace, paste the Client ID and Client Secret, then click Save Credentials. Click Login with Google Workspace and approve the request in your browser (clicking through the unverified-app screen).
One sign-in covers all seven nodes: OpenCompany requests the combined scopes for Gmail, Calendar, Drive, Sheets, Tasks, and Contacts in a single consent, with offline access so tokens refresh automatically in the background.

Gmail

Send, search, and read Gmail messages. One node, three operations selected by the Operation parameter. As an AI tool it is exposed as google_gmail.

Parameters

select
default:"send"
Operation to perform: send, search, or read
Send Search Read

Output

Search returns {operation, messages: [...], count, query, result_size_estimate}; read returns {operation} plus the formatted message fields.

Example: Search unread billing mail


Gmail Receive

Polling trigger that fires when a new Gmail message matching your filter arrives. Gmail has no simple push channel, so this node polls at a configurable interval, diffs message IDs against a baseline, and emits the first new message it finds.

Parameters

string
default:"is:unread"
Gmail search query (same syntax as the Gmail web UI)
string
default:"INBOX"
Label name to watch, or all to disable label filtering. When set, it is prepended to the query as label:<name>.
boolean
default:"false"
Remove the UNREAD label from the matched message after fetching it
number
default:"60"
Seconds between polls (clamped to 10-3600)
select
default:"owner"
Which OAuth token store to use: owner or customer (customer_id is required in customer mode)

Output

An attachments array (filename, mime_type, size, attachment_id per entry) is included when the message has attachments.

Example: Watch for invoices

The baseline of already-seen messages is kept in memory. Emails that arrive while the server is offline are treated as pre-existing and will not fire the trigger, and only the first new message per poll cycle is emitted.

Calendar

Create, list, update, and delete Google Calendar events. As an AI tool it is exposed as google_calendar.

Parameters

select
default:"create"
Operation to perform: create, list, update, or delete
string
default:"primary"
Target calendar (all operations)
Create List Update takes event_id (required) plus any of title, start_time, end_time, description, location as patch fields. Delete takes event_id (required) and send_updates (all or none — whether attendees get cancellation emails).

Output

Create and update return {event_id, title, start, end, html_link, status}; delete returns {deleted: true, event_id}.

Example: Today’s agenda


Drive

Upload, download, list, and share Google Drive files. Uploads accept either a source URL (fetched fully into memory and re-uploaded — avoid very large files) or base64-inlined content. As an AI tool it is exposed as google_drive.

Parameters

select
default:"upload"
Operation to perform: upload, download, list, or share
Upload Download List Share takes file_id (required), email (required), role (reader / writer / commenter, default reader), send_notification (default true), and an optional message.

Output

Download returns {file_id, name, mime_type, size, content_base64} (or download_url + web_link in url mode); list returns {files: [...], count, next_page_token}; share returns {permission_id, file_id, file_name, shared_with, role, web_link}.

Example: Share a report


Sheets

Read, write, and append cell values in Google Sheets. As an AI tool it is exposed as google_sheets.

Parameters

select
default:"read"
Operation to perform: read, write, or append
string
required
Spreadsheet ID (the long token in the sheet’s URL)
string
default:"A1:Z1000"
required
A1 notation, e.g. Sheet1!A1:D10. For write, a start cell like Sheet1!A1 is enough — the range expands to fit the values.
Read Write / Append

Output

Write and append return {updated_range, updated_rows, updated_columns, updated_cells}.

Example: Append a log row


Tasks

Manage personal to-do items in Google Tasks. As an AI tool it is exposed as google_tasks.

Parameters

select
default:"create"
Operation to perform: create, list, complete, update, or delete
string
default:"@default"
Which tasklist to use (all operations)
Create List Complete and delete take task_id (required). Update takes task_id (required) plus any of title, notes, due_date, status as patch fields — only non-empty fields are applied.

Output

Create, complete, and update return {task_id, title, due, status, ...}; delete returns {deleted: true, task_id}.

Example: Create a task with a due date


Contacts

Create, search, and manage contacts through the Google People API. Results are flattened into a consistent shape with primary email/phone plus the full lists. As an AI tool it is exposed as google_contacts.

Parameters

select
default:"create"
Operation to perform: create, list, search, get, update, or delete
Create List Search takes query (required) and page_size (default 30). Get and delete take resource_name (required, e.g. people/c12345678). Update takes resource_name (required) plus at least one of first_name, last_name, email, phone, company, job_title.

Output

Each contact is returned in a flattened shape:
List returns {contacts: [...], count, total_people, next_page_token}; search returns {contacts: [...], count}; delete returns {deleted: true, resource_name}.

Example: Find a contact

Contact updates replace whole field groups — updating email wipes any additional emails on the contact — and deletion is immediate and final on Google’s side.

Example: Daily agenda email

A three-node workflow that mails you a summary of today’s calendar.
  1. Calendar — Operation: list, Start Date: today, End Date: today+1d, Order By: startTime
  2. AI Agent — Prompt: “Summarize today’s events into a short agenda with times and titles.”
  3. Gmail — Operation: send, To: your own address, Subject: Today's agenda, Body: the agent’s summary
Add a scheduler in front of the Calendar node to run it automatically each morning — see Schedulers & Triggers.

Tips

Gmail’s search and Gmail Receive’s filter query both use the exact query syntax you already know from the Gmail web UI (from:, subject:, is:unread, has:attachment).
In Sheets, keep USER_ENTERED when you want =SUM(A1:A5) to become a live formula; switch to RAW when writing literal text that should not be interpreted.
Delete operations (Calendar events, Tasks, Contacts) execute immediately and without confirmation. Be especially careful when exposing them to AI agents as tools.

Email (IMAP/SMTP)

Provider-agnostic email nodes for non-Gmail accounts

AI Agents

Use the Google nodes as AI tools

Schedulers & Triggers

Run Google workflows on a schedule

AI Tools

More tools to combine with Workspace nodes