Link to the plugin page: https://zeroqode.com/plugin/1504078653898x450971943909982200
Demo to preview the plugin:
Introduction
Gather your Google contacts and their profile information automatically using this plugin for Bubble. Get your contacts authenticated and make sure they have been granted access.
Once users have allowed access to their contacts the token will not get expired and will keep renewing automatically.
You can also limit the number of fields you want to return from Google if you want just specific data to be collected.
To get started get your
App ID
and App Secret
by registering your application at Google Developers Console and set up the functionality based on your needs.How to setup
- Obtain Google API Credentials
- Go to the Google Cloud Console.
- Create a new project or use an existing one.
- Navigate to the APIs & Services section and enable the Google People API.
- Under the Credentials tab, create new OAuth 2.0 credentials:
- Select Web Application as the application type.
- Set the authorized redirect URI to:
- Note down the Client ID and Client Secret.
shellhttps://{yourappname}.bubbleapps.io/api/1.1/oauth_redirect
- Configure the Plugin in Bubble
- Install the Contacts from Google plugin.
- Enter your
Client ID
andClient Secret
in the respective fields within the plugin settings.
- Set Scopes and Permissions
- In the Google API Console, go to the OAuth Consent Screen:
- Configure the necessary permissions for accessing Google Contacts:
https://www.googleapis.com/auth/contacts.readonly
(read-only access)- Or,
https://www.googleapis.com/auth/contacts
(full access). - Save and verify the consent screen configuration.
- Set Up User Authentication in Bubble
- In your Bubble app, create a workflow to log users in with Google:
- Use the action "Log the user in with a social network".
- Select Google as the provider and ensure your API credentials are correctly configured.
- Ensure the user grants access during login.
- Test the Plugin
- Set up a Data Call to retrieve contacts using the pluginβs actions (e.g., "List Contacts").
- Verify that the returned data matches the expected output.
- Debug any issues by reviewing the browser console for OAuth or API access error messages.
- Troubleshooting
- Check OAuth Errors: Review the browser console for errors during authentication.
- Verify API Permissions: Ensure the required OAuth scopes are configured in the Google API Console.
- Plugin Settings: Confirm that the API keys, client ID, and secret are entered correctly in the plugin configuration.
Plugin Data Calls
List of Contacts
This API call retrieves a list of contacts from the authenticated user's Google Contacts. It provides a way to access the user's contacts stored on Google, allowing you to filter and manage this data within your Bubble app.
Name | Description | Type |
PersonFields | A comma-separated list of fields to include for each contact. Common values include names, emailAddresses, phoneNumbers, photos, etc. (e.g., names, emailAddresses, photos). This defines the data to be fetched for each contact.
List of available fields to display you can find here: https://developers.google.com/people/api/rest/v1/people.connections/list?hl=pt-br | Text |
PageSize | The maximum number of contacts to retrieve per request (e.g., 10, 50, 100). This allows you to limit the number of contacts returned in the API response. | Text |
Return Values:
Return type: JSON
json{ "connections": { "resourceName": "text", "etag": "text", "names": { "metadata primary": "yes/no", "metadata source type": "text", "metadata source id": "text", "displayName": "text", "familyName": "text", "givenName": "text", "middleName": "text", "displayNameLastFirst": "text", "unstructuredName": "text" }, "emailAddresses": { "metadata primary": "yes/no", "metadata source type": "text", "metadata source id": "text", "value": "text" } }, "totalPeople": "number", "totalItems": "number" }