> For the complete documentation index, see [llms.txt](https://docs.mailofly.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mailofly.com/external-integrations/email-infrastructure/google-workspace.md).

# Google Workspace

Connect Google for **OAuth sending** and **Sheets-powered segments** — two integrations that keep Gmail users and spreadsheet workflows in sync with Mailofly.

***

## Google OAuth sending

Send mail through Gmail or Google Workspace without storing your Google password.

### Setup

1. [**Accounts**](https://www.mailofly.com/user/accounts) **→ Add account → Google**
2. Complete OAuth consent
3. Account appears with your Google email as the sender

### Details

| Property      | Value                      |
| ------------- | -------------------------- |
| Auth method   | OAuth 2.0 (offline access) |
| Scopes        | Email send + profile       |
| Daily limit   | **500 emails/day**         |
| Token refresh | Automatic                  |

{% hint style="warning" %}
Google Workspace admins may need to allow Mailofly in their OAuth app allowlist.
{% endhint %}

***

## Google Sheets segments

Sync a published spreadsheet into a Mailofly segment — new rows become contacts on each sync.

{% hint style="info" %}
Requires **Basic plan or higher** (`allow_google_sheet_sync`).
{% endhint %}

### Setup

1. [**Contacts**](https://www.mailofly.com/user/contacts) **→ Google Sheet tab**
2. Select target **segment**
3. Paste the **sheet URL**
4. Set **sheet name** (tab) and **header row**
5. Click **Sync**

### Sheet requirements

| Requirement | Detail                                                  |
| ----------- | ------------------------------------------------------- |
| Access      | Sheet must be **published to web** or publicly readable |
| Header row  | Must include an `email` column                          |
| Format      | Standard Google Sheets — one contact per row            |

### Column mapping

Recognized headers map automatically:

```
email, first_name, last_name, name, phone, company, …
```

Unrecognized columns become `custom_fields` for merge tags like `{{ custom.company }}`.

### Sync behavior

* **Incremental** — only new rows since last sync are imported
* **Manual trigger** — click Sync on the connection
* **API/cron** — `POST /api/integrations/google-sheets/sync` for scheduled syncs

***

## Use cases

| Workflow                             | How                                             |
| ------------------------------------ | ----------------------------------------------- |
| Sales team maintains leads in Sheets | Sheet → segment → campaign                      |
| Event RSVP form exports to Sheets    | Auto-sync new attendees into a blast list       |
| Support team uses Gmail              | OAuth account for personal outreach via Compose |

***

## Related

* [Contacts & segments](https://docs.mailofly.com/guides/contacts)
* [Sending accounts](https://docs.mailofly.com/guides/accounts)
* [Campaigns](https://docs.mailofly.com/guides/campaigns)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mailofly.com/external-integrations/email-infrastructure/google-workspace.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
