---
title: Google Mail Integration
slug: bubble/google-mail-integration
description: Add the Google Mail (Gmail) integration to your Bubble app using the pre-configured plugin
docTags: 
createdAt: 2022-08-03T13:04:54.000Z
---

The Pathfix Google Mail plugin enables integration from your Bubble app to your user's Gmail account giving your users the ability to send emails from your app. The plugin will render the Connect button (UI) and is pre-configured to call the relevant GMail API automatically.&#x20;

This documentation will show setup guide and a few example use cases.

﻿

:::hint{type="danger"}
**Important**

You will need to have your Google Cloud Console app setup and configured before proceeding.&#x20;

Suggested read: [Link](https://medium.com/@prasanthmj/google-restricted-api-scopes-require-75k-yearly-fees-a23cad053a4c) [Link 2](https://groups.google.com/g/google-apps-script-community/c/ZS2_NCEzdQ8?pli=1)
:::



## Setup Instructions

### Setup in Pathfix&#x20;

- Log into Pathfix and add an application (or select an existing application)
- Select GMail from the list of providers&#x20;
- Add your *ClientID* and *ClientSecret* received from your Google Cloud Console and hit **Save**

****

::Image[]{src="https://api.archbee.com/api/optimize/E6H_--BmYJWG_yGaOUOxt/D0fsDY6dPRA6sze8oeZmD_image.png" size="72" width="1235" height="999" position="center" showCaption="false"}

- Navigate to the **Keys&#x20;**&#x73;ection
- Copy your Pathfix **x-private key** for use in your Bubble plugin



![](https://api.archbee.com/api/optimize/E6H_--BmYJWG_yGaOUOxt/mf-XfrGtXXXiVYnUf8iH2_image.png "Image: Keys")



### Setup in Bubble

You will need to install and configure the following 2 plugins to your Bubble app:

1. [Pathfix OAuth Connector](https://docs.pathfix.com/bubble/pathfix-oauth-connector)
2. [Gmail (OAuth)](https://bubble.io/plugin/gmail-oauth-1659503175277x715510102451814400) plugin by Pathfix &#x20;



Configure your Gmail plugin:

- In Bubble, go to Plugins and click on the GMail (OAuth) plugin&#x20;
- Under x-partner-key (shared headers), add your Pathfix x-partner-key from the Keys section of your Pathfix account&#x20;

﻿﻿

## Send Email Setup

To setup a 'Send email" action from your app:

- Add the inout fields in your Bubble design (To email, Subject, Body etc.) and add a button to perform the action (e.g. Send)
- Add a workflow to trigger when the Send button is clicked
- The Workflow will need to be setup as shown in the screenshot below:&#x20;



::Image[]{src="https://api.archbee.com/api/optimize/E6H_--BmYJWG_yGaOUOxt/HMtdMusXH9M3r8aFUcgHW_image.png" size="74" width="1072" height="858" position="center" showCaption="false"}



## Actions Available

The Connector plugin calls a few APIs and offers them as Actions in your Bubble Workflow once installed. These are:

﻿

::Image[]{src="https://api.archbee.com/api/optimize/E6H_--BmYJWG_yGaOUOxt/S2xWbSEP0ECQV4UBRDE22_image.png" size="84" width="1173" height="388" position="center" showCaption="false"}



﻿

﻿





