LLM Controls integrates with Google OAuth for authenticating the Gmail loader, Google Drive loader, and Google Drive Search components.Learn how to create an OAuth app in Google Cloud, obtain the necessary credentials and access tokens, and add them to LLM Controls’ Google components.
Click Select a project, and then click New Project to create a new project.
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.
To navigate to the OAuth consent screen, click APIs & Services, and then click OAuth consent screen.
Populate your OAuth consent screen with the application name, audience, and user support email. For the audience, select External. This creates a testing application environment that you can add users to.
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 LLM Controls with OAuth. These email addresses have access to the application while it’s in a Testing publishing state. For more information, see the Google documentation.
To create an OAuth Client ID, navigate to Clients and then click Create Client.
Choose Desktop app as the application type, and then name your client ID.
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 LLM Controls application.
Create a new project in LLM Controls.
Add a Google OAuth Token component to your flow.
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.
In the Scopes field of the Google Oauth Token component, enter the scope required to access your resources. For example, to allow your LLM Controls application to access a user’s Google Drive, the scope is https://www.googleapis.com/auth/drive. For more information, see the Google documentation.
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.
infoIf a new tab does not open automatically, check the LLM Controls Logs for the Google authentication URL. Open this URL in your browser to complete the authentication.
After successful authentication, your LLM Controls application can request and refresh tokens. These tokens enable LLM Controls to interact with Google services on your behalf and execute your specified requests.
For a pre-built JSON file of a flow that uses the Google Drive loader component, download the Google Drive Document Translation Example Flow JSON to your local machine.Example flow structure:
Copy
Google OAuth Token → Parse Data → JSON Cleaner → Google Drive Loader → Prompt → OpenAI Model → Chat Output
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.
Download the Google Drive Document Translation Example Flow JSON to your local machine.
To import the downloaded JSON to LLM Controls, click Options, and then select Import.
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.
In the Scopes field of the Google Oauth Token component, enter the scope required to access your resources. For example, to allow your LLM Controls application to access a user’s Google Drive, the scope is https://www.googleapis.com/auth/drive. For more information, see the Google documentation. 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.
To allow the LLM Controls component to access the document in Google Drive, copy the Google Drive documentID from the document’s URL.
infoThe 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.
In the Google Drive loader component, in the Document ID field, paste the document URL.
To view the translated document, open the Playground.
This component creates, reads, and writes Google Sheets using credentials from Google Authenticator. It supports operations including create, read, write, append, clear, and listing sheets, with automatic spreadsheet creation for write/append when no spreadsheet ID is provided.
This component reads Google Docs and extracts text content and metadata using credentials from Google Universal Authenticator. It supports reading document content with optional formatting preservation and retrieving document metadata.
Connect Google Credentials JSON from Google Universal Authenticator or paste JSON string
Enter the Document ID (found in the Google Docs URL)
Select an Operation (read or metadata)
Optionally toggle Include Metadata and Preserve Formatting
Parameters
Inputs
Name
Display Name
Info
credentials_json
Google Credentials JSON
Connect from Google Universal Authenticator component output, or paste JSON string containing OAuth 2.0 access token information for Google Docs access
document_id
Document ID
Google Docs document ID (found in the URL)
operation
Operation
Operation to perform on the Google Doc. Options: read, metadata.
include_metadata
Include Metadata
Whether to include document metadata with content
preserve_formatting
Preserve Formatting
Whether to preserve basic formatting information in the extracted text
Outputs
Name
Display Name
Info
data
Document Data
Full operation result as a Data object containing text, metadata, and word/character counts.
text
Document Text
Extracted document text as a Data object.
metadata
Document Metadata
Document metadata (ID, title, revision, word count, etc.) as a Data object.
This component provides complete Gmail management with email extraction, sending, deletion, label management, attachment processing, and Google Drive integration. It supports duplicate avoidance, search queries, and multiple output formats for downstream processing.
This component authenticates with Gmail, Drive, Sheets, Docs, and Calendar using a client_secret.json file and outputs a credentials JSON for use in LLMC extractors. It uses a two-step OAuth flow: first generating an OAuth URL, then exchanging the authorization code for credentials.
This component is a universal Google services authenticator. Select which Google services you need (Gmail, Sheets, Drive, Docs, Calendar, Photos, Contacts, YouTube, etc.) and authenticate once for all selected services. It supports both Desktop and Web application OAuth client types.