Skip to main content
Lifetime license included with every purchase
n8n workflowsGoogle WorkspaceGmail automationSheets integration

How to Automate Google Workspace with n8n (Gmail, Calendar, Drive, and Sheets)

Automate your Google Workspace with n8n — route Gmail, create calendar events, organize Drive files, and sync Sheets data. Step-by-step workflows with code.

Nn8n Marketplace Team·May 14, 2026·10 min read

Google Workspace Is Where Your Work Lives. Automation Is What Moves It Forward.

Gmail, Calendar, Drive, and Sheets are the operational backbone for millions of teams. But most people interact with them manually — reading emails, creating events, moving files, copying data between tabs. Individually, each task takes seconds. Collectively, they consume hours every week.

The problem isn't any single tool. It's the friction of moving data between them and into the rest of your stack. A form submission should create a calendar event. An email should update a spreadsheet row. A new Drive upload should trigger a notification. None of that happens by default.

n8n connects your entire Google Workspace and acts as the glue between it and every other tool your business uses — CRMs, Slack, Notion, databases, and more. You build the logic once, and the system handles the movement automatically.

What You Can Automate

Every Google Workspace product has automatable workflows:

  • Gmail routing — parse inbound emails, extract key fields, and route them to the right system (CRM, Sheets, support queue, Slack channel)
  • Auto-replies and templates — send structured responses to inbound inquiries without touching your inbox
  • Calendar event creation — auto-schedule meetings when form submissions, deal closures, or onboarding triggers fire
  • Drive file organization — move, rename, and share uploaded files based on metadata or content
  • Sheets as a data hub — sync CRM records, form data, and webhook payloads in and out of Sheets automatically
  • Google Forms pipelines — process form responses the moment they land, without waiting for a manual export
  • Cross-product triggers — a new Sheet row triggers a Calendar invite which triggers a Gmail confirmation — all in one n8n workflow

The Google Workspace Pipeline

A complete n8n Google Workspace system handles four parallel tracks:

Track 1 — Inbound Email Processing:
Gmail Trigger (new email) → Code (extract fields) → IF (route by type)
  → CRM update + Gmail (auto-reply)
  → Google Sheets (log inquiry) + Slack (notify team)
  → Gmail (label + archive)

Track 2 — Form-to-Calendar:
Google Sheets Trigger (new row) → Code (build event payload)
  → Google Calendar (create event)
  → Gmail (send confirmation to submitter)
  → Google Sheets (write event ID back to row)

Track 3 — Drive File Processing:
Google Drive Trigger (new file uploaded)
  → Code (check file type / name pattern)
  → Switch
    → Contract: Google Drive (move to /contracts/) + CRM update
    → Invoice: Google Sheets (log) + Gmail (notify AP team)
    → Other: Google Drive (move to /inbox/) + Slack (notify uploader)

Track 4 — Sheets Sync:
Schedule Trigger (nightly) → CRM (fetch updated contacts)
  → Loop Over Items → Google Sheets (upsert row by email)
  → Google Sheets (log sync timestamp)

Each track runs independently. Changes in any tool propagate to the others without manual intervention.

1. Collect

The entry point depends on which Google product fires the event.

For Gmail, use the Gmail Trigger node. Set it to fire on new messages matching a filter — a specific label, sender domain, or subject keyword. For Sheets, use the Google Sheets Trigger (typeVersion 4.5) which polls on a configurable interval and emits new rows. For Drive, the Google Drive Trigger watches a folder for new or modified files.

Polling intervals and API quotas

Google Sheets Trigger polling uses the Sheets API on every check. Set the interval to at least 5 minutes with everyXMinutes mode to stay within Google's default quota limits. For high-volume sheets, consider a Google Apps Script webhook instead and receive events via n8n's Webhook node.

2. Process / Segment

Once data is in n8n, a Code node (typeVersion 2, jsCode param) does the heavy lifting — extracting fields from email bodies, reformatting dates for Calendar, building drive paths, or computing which Sheets row to update.

For Gmail, a simple extractor might look like:

const subject = $json.subject || '';
const from = $json.from || '';
const body = $json.text || $json.snippet || '';

return [{
  json: {
    from,
    subject,
    type: subject.toLowerCase().includes('invoice') ? 'invoice'
        : subject.toLowerCase().includes('support') ? 'support'
        : 'general',
    body: body.slice(0, 500),
  }
}];

This gives the downstream IF or Switch node something concrete to route on.

3. Route

An IF node (typeVersion 2) or Switch node branches the flow based on computed fields. Route support emails to your helpdesk system, invoices to your accounting Sheets tab, and everything else to a general inbox log.

For Calendar creation, routing determines which calendar receives the event. Sales calls go to the sales team calendar; onboarding sessions go to customer success. The Google Calendar node accepts a calendarId expression — set it dynamically from the input row.

4. Act

The action nodes write to Google products:

  • Google Sheets (typeVersion 4.5, resource: sheet, operation: append) appends rows without overwriting existing data.
  • Google Calendar creates events with summary, start, end, attendees, and description from expression values.
  • Gmail sends confirmation emails with structured bodies. Use the sendEmail operation with to, subject, and message fields pulled from the processed data.
  • Google Drive moves or copies files using the file ID from the trigger and a destination folder ID from your config.
Write event IDs back to Sheets

When Google Calendar creates an event, it returns an id field. Use a Google Sheets update node to write that ID back into the originating row. This creates a bidirectional link — later workflows can check Sheets to find the Calendar event ID and update or cancel it without a search.

5. Follow Up

The last step closes the loop — a confirmation email, a Slack notification, or a status update in Sheets.

For form-to-calendar flows, send the submitter a Gmail confirmation with the meeting details and a Google Meet link (which Calendar returns in the event response). For Drive uploads, post the file name and destination path to a Slack channel so the right person knows to review it.

Implementation Patterns

Pattern 1 — Gmail-to-CRM Sync

Route inbound sales inquiries from Gmail directly into your CRM without any manual data entry:

Gmail Trigger (label: "Inquiries") → Code (extract name, company, email, intent)
  → HTTP Request (POST /crm/contacts — create or update)
  → Google Sheets (append to inquiry log)
  → Gmail (send auto-reply using contact's first name)

The Code node uses a regex on the email body to extract the sender's name, company, and the product they mentioned. The HTTP Request node pushes it to your CRM's API. The Gmail reply goes out in under 5 seconds from the moment the email arrives.

Pattern 2 — Form-to-Meeting Scheduler

Turn any Google Form or Typeform submission into a booked calendar event:

Google Sheets Trigger (new form response row)
  → Code (parse name, email, preferred_time, topic)
  → Google Calendar (create event: title, start, end, attendees: [submitter, rep])
  → Gmail (send confirmation to submitter with Meet link)
  → Google Sheets (write: event_id, status=booked back to row)

The preferred_time field from the form becomes the Calendar event's start time after a Code node converts it to ISO 8601. The attendees array includes both the submitter's email and the assigned rep — both receive the Google Meet link automatically.

Handle timezone mismatches in Calendar events

Google Calendar's API expects start and end times in RFC 3339 format with a timezone offset — for example 2026-05-14T14:00:00-07:00. Use a Code node to convert the submitter's local time using their timezone preference if your form collects it. Without the offset, Calendar defaults to UTC and meetings land at the wrong time.

Pattern 3 — Drive-Triggered Document Workflow

Process uploaded contracts, invoices, or intake forms the moment they land in Drive:

Google Drive Trigger (folder: /uploads/) → Code (classify by filename pattern)
  → Switch
    → "contract": Drive (move to /contracts/active/) + HTTP Request (CRM: attach doc)
    → "invoice": Sheets (log: vendor, amount, due date) + Gmail (notify AP team)
    → "intake": Sheets (append to intake log) + Gmail (send client receipt)
  → Slack (post: file processed, destination, next step)

The filename pattern match in the Code node is simple string logic — check if the name contains contract, invoice, or intake. The Switch node routes on that value. Each branch writes to the appropriate system and sends a notification.

n8n Nodes You'll Use Most

NodePurpose
Gmail TriggerFire on new emails matching a filter
GmailSend, reply, label, draft emails
Google Sheets TriggerWatch a spreadsheet for new rows
Google SheetsRead, append, and update rows
Google CalendarCreate, update, and list events
Google Drive TriggerWatch a folder for new or changed files
Google DriveMove, copy, share, and list files
CodeExtract, transform, and format data between nodes
IF / SwitchRoute data based on type, value, or condition
HTTP RequestPush data to external CRMs, APIs, or webhooks

Getting Started

  1. Connect your Google accounts — in n8n's Credentials settings, add a Google OAuth2 credential covering Sheets, Calendar, Drive, and Gmail scopes. One credential works across all four nodes.
  2. Pick one workflow to start — the form-to-calendar pattern is the easiest first build. It has a clear input (Sheet row), a clear output (Calendar event + email), and immediate feedback.
  3. Set up the Google Sheets Trigger — point it at your form responses sheet, set polling to everyXMinutes with minute: 5, and activate the workflow.
  4. Build the Code node — write a small jsCode block that reads $json fields from the Sheet row and returns a structured object with name, email, startTime, and topic.
  5. Add the Google Calendar node — use operation: create and map fields from the Code node output using expressions prefixed with =.
  6. Add a Gmail confirmation node — send the submitter their meeting details using ={{ $json.email }} as the to field and a template body referencing their name and the event time.
  7. Test end-to-end — submit a real form entry, confirm the event appears on the target calendar, and verify the confirmation email arrives within 30 seconds.

Once the first workflow runs cleanly, add a second track — Gmail routing or Drive file processing — following the same pattern: trigger → extract → route → act → notify.

Get the Email Follow-Up Automator template for Gmail workflows

For a production-ready data entry and Sheets sync workflow, see the automated data reporting guide which covers building structured pipelines that write clean records to Google Sheets on a schedule.

If your team also needs to automate the documents and reporting that feed into Google Workspace, the n8n marketing automation guide covers building cross-platform pipelines where Sheets and Gmail are the connective tissue between your tools.

Browse Google Workspace automation templates
FAQ

Common questions

Can n8n read and send emails through Gmail?
Yes. n8n has a native Gmail node that reads, sends, labels, and drafts emails using OAuth credentials. You can trigger workflows from incoming emails matching a filter, auto-reply based on content, forward parsed data to Sheets, or route emails to different team channels — all without writing custom code.
How does n8n create Google Calendar events automatically?
Use the Google Calendar node in n8n to create, update, or list events. You can trigger calendar event creation from form submissions, CRM record updates, Slack messages, or any inbound webhook. For example, when a new lead fills out a form, n8n can instantly schedule an intro call on the sales rep's calendar.
Can n8n watch a Google Sheet for new rows and trigger a workflow?
Yes. The Google Sheets Trigger node polls your spreadsheet on a configurable interval and fires whenever new rows are added. This is commonly used to kick off onboarding flows, send welcome emails, or sync records to a CRM whenever someone fills out a form that writes to a Sheet.
Stop reading. Start running.

Get the workflow templates this guide is built on

Import-ready n8n JSON, step-by-step setup, and tested end-to-end. One-time payment, own it forever.