GMAIL API

The complete Gmail functionality in your app

Abdullah Fawad

Last Update 2 years ago

Gmail API Plugin
Seamlessly integrate Gmail functionalities into your Bubble applications. This plugin allows users to authenticate via Gmail, send emails, manage threads, list and create labels, and modify messages. OAuth authentication ensures secure access to the user’s Gmail account, making this plugin ideal for email automation, communication management, and productivity tools.

Links:
Demo: https://chakor-demo-4.bubbleapps.io/version-test/gmail
Editor: https://bubble.io/page?id=chakor-demo-4&test_plugin=1734693744642x623924065682325500_current&tab=Plugins&name=gmail&type=page 

Plugin Instructions
Step 1: Authenticate with Gmail
To use this plugin, you will need a Client ID and Client Secret key, which can be obtained from the Google Cloud Console.
Before accessing Gmail API features, the user must log in via Gmail using Bubble’s built-in OAuth provider. Follow these steps to set up authentication:

  1. Set Up OAuth Login
    • Go to your Bubble Workflow editor.
    • Add the "Signup/Login with a social network" action in the workflow (e.g., when the user clicks a "Login with Gmail" button).
    • In the action settings, set the OAuth Provider to Gmail API.

  2. User Authentication
    • Once the user logs in successfully, an access token is obtained. This token is required for all subsequent API calls.
Step 2: API Calls Post-Authentication
After successful login, the following Gmail API features can be used:
  1. List Emails
    • Retrieve a list of emails from the user’s Gmail inbox.

  2. Get Email By ID
    • Retrieve a specific email message by its unique ID.

  3. Get Thread By ID
    • Access an email thread using its thread ID.

  4. Get Alias
    • Retrieve alias email addresses associated with the account.

  5. List Labels
    • Fetch a list of all labels in the user’s Gmail account.

  6. Send Email
    • Send a new email.

  7. Send Email in Thread
    • Reply to or send an email within a specific thread.

  8. Modify Email
    • Apply labels or modify a specific message.

  9. Send Email to Trash
    • Move a specific email to the trash folder.

  10. Create Label
    • Create a custom label for emails.

Step 3: Special Instructions for Sending Emails
  • Use the "Write Email" action to generate a Base64-encoded email string.

  • The Base64-encoded email is required for any Send Email or Send Email in Thread API calls.
By following these steps, users can efficiently authenticate and leverage Gmail API functionalities within their Bubble applications.

Was this article helpful?

0 out of 0 liked this article