Instructions
Plugin Instructions
To use this plugin, you will need a Client ID and Client Secret key, which can be obtained from the Google Cloud Console.
Then, the user must first authenticate through Gmail using Bubble’s built-in OAuth provider login mechanism before making API calls. Follow these instructions to ensure the Gmail API works as expected:
Step 1: User Login (Required) - Signup/Login with Gmail
Set up Bubble's "Signup/Login with a Social Network" Action:
Go to your Bubble Workflow editor.
Add the "Signup/Login with a social network" action in the workflow where the user initiates the login (for example, clicking a "Login with Gmail" button).
In the action settings, set the OAuth Provider to Gmail API.
Step 2: Use API Calls After Authentication
Once the user has logged in with Gmail and the access token is obtained, they can use the plugin's Gmail API features. These include interacting with Gmail messages, labels, and more.
Step 3: API Calls - Post-Authentication
After successful authentication via the Signup/Login with a Social Network action, the user can then proceed with the following API calls:
List Emails: List the user’s Gmail inbox.
Get Email By ID: Retrieve an email message by its unique ID.
Get Thread By ID: Retrieve an email thread by its thread ID.
Get Alias: Retrieve the alias emails.
List Labels: List all labels in the user’s Gmail account.
IMPORTANT: when sending any email, you have to use the "write email" action to get the base64 encoded email, then use this base64 encoded email in any of the send email api calls.
Send Email: Send a new email.
Send Email in Thread: Reply or send an email in a specific thread.
Modify Email: Apply labels or modify a message.
Send Email to Trash: Move a specific email to trash.
Create Label: Create a new label for emails.