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

# Send email through Gmail and Google Workspace

> Connect a Google Workspace account to EmailUX by trusting the app client ID, then deliver templates through Gmail with the API.

Connect a Google Workspace account to send EmailUX templates from that mailbox. Gmail supports **`deliver()`**.

> [!NOTE]
>
> A Google Workspace admin must trust the EmailUX app once. Personal `@gmail.com` accounts cannot use the admin steps below.

**1. Start the connection**

Open **Emails, Providers and API Keys**, choose **Add provider**, and select the **Gmail** tab. The dialog is titled **Connect GSuite Workspace**.

**2. Copy the client ID**

Copy the **Client ID** shown in the dialog.

**3. Trust the app in Google Admin**

In the [Google Workspace Admin console](https://admin.google.com/ac/owl/list?tab=configuredApps), go to **Show more, Security, Access and data control, API controls, Manage third-party app access**. Choose **Configure new app**, search for the client ID, and set it to **Trusted**.

**4. Set a sender name**

Optionally enter a **Default sender name**, such as `Your product`.

**5. Connect the account**

Select **Connect Account** and approve access with the Google account you want to send from.

**6. Create an API key**

Generate a key in the provider card. See [API keys](https://docs.emailux.com/providers/api-keys.md).

**7. Deliver**

```ts theme={null}
import { EmailUxApiClient } from '@emailux/api-client';

const client = new EmailUxApiClient({
  apiKey: process.env.EMAILUX_API_KEY!,
  provider: 'gmail',
});

await client.deliver({
  experienceId: 'welcome_email',
  channelData: {
    toEmail: 'alex@example.com',
    fromEmail: 'your-connected-sender@yourdomain.com',
    fromEmailName: 'Your product',
  },
  data: { nameTo: 'Alex' },
});
```

`fromEmail` must match the connected Google account.

## Troubleshooting

> [accordion] The client ID shows as not configured
>
> The server could not load the client ID. Contact support, then retry.

> [accordion] Google blocks the connection
>
> The app is not trusted yet. Complete the Admin console step above and wait a few minutes.

> [accordion] Sending limits
>
> Gmail enforces its own daily sending limits per account. For high volume, use [SendGrid](https://docs.emailux.com/providers/sendgrid.md).

Looking for signatures rather than sending? See [Connect Google Workspace for signatures](https://docs.emailux.com/signatures/connect-google-workspace.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.