With the following Public Integrations, you can create and edit Google Docs and upload images to Google Drive using OAuth authorization from your Google account.
- com.globant.geai.gdrive.v2.create_docs: Creates a new Google Docs document with specified content.
- com.globant.geai.gdrive.v2.create_pdf: Creates a new PDF document directly within Google Drive.
- com.globant.geai.gdrive.v2.create_ppt: Creates a new presentation in Google Slides and saves it to Google Drive.
- com.globant.geai.gdrive.v2.fill_blanks_google_docs: Fills out templates by replacing blank fields or marked keywords with given values.
- com.globant.geai.gdrive.v2.read_google_docs: Reads and extracts text from an existing Google Docs document.
- com.globant.geai.gdrive.v2.upload_image: Uploads an image to Google Drive.
When you add any of these Tools to an Agent, each consumer will be asked to complete the Google OAuth 2.0 authorization.
Login occurs interactively during the interaction with the Agent and authorizes the operation on behalf of the logged-in user. The authorization is limited to the scopes configured in Google Cloud OAuth.
The Agent requests authentication to continue. Click on Login.
Google consent window to grant Globant Enterprise AI permissions on your Drive.
Before using these Tools, you must configure Google Cloud OAuth 2.0 and register the credentials as a Secret in your Project.
- Go to https://console.cloud.google.com/ and sign in.
- Create a new project or select an existing one.
- Go to APIs & Services > Library, and enable the Google Drive API for that project.
- From the side menu, go to APIs & Services > OAuth consent screen.
- Click on Get started and configure the following:
- App Information: Enter the App name and User support email. Click on Next.
- Audience: Select External (or Internal for organization-only use). Click on Next.
- Contact Information: Enter your email address. Click on Next.
- Finish: Accept the "Google API Services: User Data Policy". Click on Continue, and then click on the Create button.
- From the side menu, go to APIs & Services > Credentials.
- Click on Create Credentials, select OAuth client ID, and configure the following:
- Application type: Select Web application.
- Name: Enter a descriptive name (for example, GoogleDrive OAuth 2.0 Web App - geai-app).
- Authorized redirect URIs: Click on Add URI and paste the exact URL:
- https://console.<your-domain>/oauth_tool_login_callback (for example, https://console.saia.ai/oauth_tool_login_callback).
- Click on Create. Copy and securely save the Client ID and Client Secret; you will need them to create the Secret in your Project.
- If you have not done so already, publish your app from the OAuth consent screen in Google Cloud. This step is required for the credentials to work with external users.
- Go to the Console, open the Project where you will use this Integration, and create two new Secrets. Follow the steps in How to create a Secret.
- Create one Secret for the Client ID (for example, gdrive_client_id). In the Value field, paste the exact Client ID generated in Google Cloud.
- Create another Secret for the Client Secret (for example, gdrive_client_secret). In the Value field, paste the exact Client Secret generated in Google Cloud.
- In the Integrations Dashboard, open Google Drive (User Consent) and go to the Integration Parameters tab.
- In securityScheme.flows.authorizationCode.clientId, enter the name of the Secret that stores the Client ID (for example, gdrive_client_id).
- In securityScheme.flows.authorizationCode.clientSecret, enter the name of the Secret that stores the Client Secret (for example, gdrive_client_secret).
- In the same Integration, go to the Tool Parameters tab and configure the following optional parameter:
- email: Enter the email address that will receive access to the generated or modified Google Drive file.
This parameter is available in Tools that create or upload files (such as create_docs, create_ppt, upload_image, create_pdf, or fill_blanks_google_docs). If provided, the generated file will be automatically shared with the specified email address. If left empty, the file will be created in the authenticated user's Google Drive without additional sharing.
Tools that only read content, such as com.globant.geai.gdrive.v2.read_google_docs, do not require this parameter.
After completing these steps, you can add any of these Tools to your Agent from the AI & Tools Tab.