BroxiAI
  • Welcome
  • Account
    • Quickstart
    • Password
    • Team
      • Create team
      • Join team
      • Payment & Billing
      • Payment Policy
    • Global Variables
    • API Keys
  • Workflow
    • Overview
    • Quickstart
    • Components
    • Playground
    • Publish Workflow
    • File Manager
    • Webhook
  • Components
    • Input & Output
    • Agents
    • AI Models
    • Data
    • Embeddings
    • Helper
    • Loader
    • Logic
    • Memories
    • Processing
    • Prompt
    • Tools
    • Vector database
  • Advanced
    • Use Agent in flow
    • MCP Connect
    • MCP Astra DB
  • Integration
    • Apify
    • AssemblyAI
    • Composio
    • Google
      • Google Auth
      • Vertex AI
    • Notion
      • Setup
      • Notion Conversational Agent
      • Notion Meeting Notes Agent
Powered by GitBook
On this page
  • Create an OAuth Application in Google Cloud​
  • Retrieve Access and Refresh Tokens​
  • Create a flow with Google Drive loader​
  1. Integration
  2. Google

Google Auth

PreviousGoogleNextVertex AI

Last updated 12 days ago

Learn how to create an OAuth app in Google Cloud, obtain the necessary credentials and access tokens, and add them to BroxiAI's Google components.

Create an OAuth Application in Google Cloud

  1. Navigate to the .

  2. Click Select a project, and then click New Project to create a new project.

OAuth Client ID and Secret
  1. To enable APIs for the project, select APIs & Services, and then click Library. Enable the APIs you need for your project. For example, if your flow uses the Google Drive component, enable the Google Drive API.

  2. To navigate to the OAuth consent screen, click APIs & Services, and then click OAuth consent screen.

  3. Populate your OAuth consent screen with the application name, audience, and user support email. For audience, select External. This creates a testing application environment that you can add users to.

  4. To create an OAuth Client ID, navigate to Clients, and then click Create Client.

  5. Choose Desktop app as the application type, and then name your client ID.

  6. Click Create. A Client ID and Client Secret are created. Download the credentials as a JSON file to your local machine and save it securely.

With your OAuth application configured and your credentials JSON file created, follow these steps to authenticate the BroxiAI application.

  1. Create a new project in Langflow.

  2. Add a Google OAuth Token component to your flow.

  3. In the Credentials File field of the Google OAuth Token component, enter the path to your Credentials File, the JSON file containing the Client ID credentials you downloaded from Google in the previous steps.

  4. To authenticate your application, in the Google OAuth Token component, click Play. A new tab opens in the browser to authenticate your application using your Google Cloud account. You must authenticate the application with the same Google account that created the OAuth credentials.

If a new tab does not open automatically, check the BroxiAI Logs for the Google authentication URL. Open this URL in your browser to complete the authentication.

  1. After successful authentication, your BroxiAI application can request and refresh tokens. These tokens enable BroxiAI to interact with Google services on your behalf and execute your specified requests.

In this example, the Google Drive loader component loads a text file hosted on Google Drive, translates the text to Spanish, and returns it to a chat output.

  1. To import the downloaded JSON to Langflow, click Options, and then select Import.

  2. In the Credentials File field of the Google OAuth Token component, enter the path to your Credentials File, the JSON file containing the Client ID credentials you downloaded from Google in the previous steps.

  3. To allow the Langflow component to access the document in Google Drive, copy the Google Drive documentID from the document's URL.

The documentID is located between /d/ and /edit in a Google Drive document's URL. For example, in the URL https://drive.google.com/file/d/1a2b3c4D5E6F7gHI8J9klmnopQ/edit, the documentID is 1a2b3c4D5E6F7gHI8J9klmnopQ.

  1. In the Google Drive loader component, in the Document ID field, paste the document URL.

  2. To view the translated document, open the Playground.

To add users to your OAuth audience, click Audience. Under Test users, click Add users. Enter any email addresses you intend to use to authenticate Langflow with OAuth. These email addresses have access to the application while it's in a Testing publishing state. For more information, see the .

Retrieve Access and Refresh Tokens

In the Scopes field of the Google Oauth Token component, enter the scope required to access your resources. For example, to allow your Langflow application to access a user's Google Drive, the scope is https://www.googleapis.com/auth/drive. For more information, see the .

Create a flow with Google Drive loader

For a pre-built JSON file of a flow that uses the Google Drive loader component, download the to your local machine.

Download the to your local machine.

In the Scopes field of the Google Oauth Token component, enter the scope required to access your resources. For example, to allow your Langflow application to access a user's Google Drive, the scope is https://www.googleapis.com/auth/drive. For more information, see the . The example flow includes a Parse data component to convert the data output of the Google OAuth Token component to the text input of the JSON Cleaner component.

Google documentation
​
Google documentation
​
Google Drive Document Translation Example Flow JSON
Google Drive Document Translation Example Flow JSON
Google documentation
​
Google Cloud Console