Unify Integrations
Logo
Google Vertex AI

Google Vertex AI

Logo

6 mins READ

Google Vertex AI is Google Cloud's managed platform to build, train and deploy AI models, now part of Gemini Enterprise Agent Platform. The UnifyApps Google Vertex AI connector uses the Vertex AI API (aiplatform.googleapis.com) to generate content with Gemini and tuned models, get predictions from deployed endpoints, and invoke agents deployed in Vertex AI Agent Engine (now Agent Runtime) from workflows and agents.

This guide covers every authentication type available on the connection form, and the actions supported, along with the scope and IAM permission each one needs.

Authentication

Before you begin, you should have the following information:

  • Connection name: a descriptive name such as MyAppVertexAIIntegration, so the connection is easy to identify later.

  • Authentication type: select the type of authentication for connecting to your Google Cloud project:

    1. Service Account

    2. OAUTH

    3. OAuth with Client Credentials

Every authentication type also shows two optional fields: GCP Project ID, the ID of your Google Cloud project, and Request timeout duration, the request timeout in seconds. The connection has no Scopes field: it always requests the cloud-platform scope. The Gemini Enterprise Agent Platform API (formerly Vertex AI API) must be enabled in the project, and the account that the calls run as needs a Vertex AI role on it, such as Agent Platform User (formerly Vertex AI User).

1. Service Account

Use this for Google Workspace domains, where a service account acts on behalf of a user in the domain through domain-wide delegation. No user has to sign in, but the calls run as the user you enter in User Email.

Step 1: Create a service account in Google Cloud

  1. In the Google Cloud Console, select or create a project, and enable the Gemini Enterprise Agent Platform API (formerly Vertex AI API) under APIs & Services → Library.

  2. Go to IAM & Admin → Service Accounts and click Create service account. Enter a name and description and click Create and continue.

  3. Under Permissions, assign roles to the service account, for example Service Account Token Creator and Agent Platform Administrator (formerly Vertex AI Administrator), then click Continue and Done.

google-vertex-ai-screenshot-1.png
google-vertex-ai-screenshot-1.png

  1. Open the service account and copy its Email. Click Show advanced settings and, under Domain-wide delegation, copy the Client ID used in the next step.

google-vertex-ai-screenshot-2.png
google-vertex-ai-screenshot-2.png

  1. Go to the Keys tab → Add key → Create new key, choose JSON and click Create. The downloaded file holds the client_email and private_key. Store it securely.

Step 2: Give the service account domain-wide access

  1. A Google Workspace super administrator opens the Admin console → Security → Access and data control → API controls.

  2. Click Manage Domain Wide Delegation → Add new.

  3. Enter the service account's client ID, add the scope https://www.googleapis.com/auth/cloud-platform, and click Authorize. See Delegate domain-wide authority to your service account for details.

Note: because the connection impersonates the user in User Email, that user must also have a Vertex AI role on the project, such as Agent Platform User. Google says domain-wide delegation changes can take up to 24 hours to apply.

Step 3: Create the connection in UnifyApps

  1. Open Connections → New Connection → Google Vertex AI and enter a Connection name.

  2. Select Service Account as the Authentication type.

  3. Enter the GCP Project Service Account Email and paste the Private Key from the JSON key file.

  4. Enter the User Email of the Workspace user the service account acts on behalf of (for example user@yourdomain.com).

  5. Optionally enter the GCP Project ID and a Request timeout duration.

  6. Click Test Connection to validate the credentials, then click Create.

2. OAUTH

Use this when you want to connect with your own Google account through UnifyApps' pre-configured OAuth client, and do not need to create a Google Cloud app.

  1. Enter a Connection name.

  2. Select OAUTH as the Authentication type.

  3. Optionally enter the GCP Project ID and a Request timeout duration.

  4. Click Authorize. You are redirected to the Google sign-in page.

  5. Sign in with a Google account that has a Vertex AI role on the project you want to use.

  6. Review the permissions on the consent screen, which ask for access to your Google Cloud data, and click Allow.

  7. You are redirected back to UnifyApps with a confirmation that the account is connected.

3. OAuth with Client Credentials

Use this when your organization wants the connection to use its own Google Cloud OAuth client, while actions still run as the Google user who signs in.

Step 1: Create an OAuth client in Google Cloud

  1. In the Google Cloud Console, select or create a project, and enable the Gemini Enterprise Agent Platform API (formerly Vertex AI API) under APIs & Services → Library.

  2. Go to Google Auth platform → Branding. If you see Google Auth platform not configured yet, click Get Started, enter an App name, User support email, Audience and contact email, and click Create.

  3. Go to Data Access, click Add or Remove Scopes, add the https://www.googleapis.com/auth/cloud-platform scope, and click Save. If the audience is External, add the users who will sign in under Audience → Test users.

  4. Go to Google Auth platform → Clients and click Create Client. Choose Web application as the Application type and enter a name.

  5. Under Authorized redirect URIs, click Add URI and enter the UnifyApps OAuth callback URL for your environment, which ends in /api/connector-auth-callback/oauth. This connection form does not display it; your UnifyApps administrator can provide it.

  6. Click Create, then copy the Client ID and Client secret. Copy the secret immediately: Google shows it only once.

Step 2: Connection setup in UnifyApps

  1. Open Connections → New Connection → Google Vertex AI and enter a Connection name.

  2. Select OAuth with Client Credentials as the Authentication type.

  3. Enter the Client ID and Client secret copied from Google Cloud.

  4. Optionally enter the GCP Project ID and a Request timeout duration.

  5. Click Authorize, sign in with a Google account that has a Vertex AI role on the project, and click Allow on the consent screen.

  6. Confirm the success message after the redirect back to UnifyApps.

Actions

Every action uses the cloud-platform scope (https://www.googleapis.com/auth/cloud-platform), which the connection always requests. What an action may do is then decided by IAM, so each row also names the IAM permission the account needs on the project. The Agent Platform User role (roles/aiplatform.user) includes all of them.

Actions

Description

Scopes Required

Generate content

Generates content with a Gemini publisher model or a tuned model endpoint in Google Vertex AI.

cloud-platform (IAM: aiplatform.endpoints.predict)

Generate content (Generic)

Generates content using the Gemini API in Google Vertex AI, with an endpoint path and request payload you define.

cloud-platform (IAM: aiplatform.endpoints.predict for generateContent endpoints)

Get prediction

Gets a prediction from a model deployed to a Google Vertex AI endpoint.

cloud-platform (IAM: aiplatform.endpoints.predict)

Invoke Agent

Invokes an agent deployed in Google Vertex AI Agent Engine.

cloud-platform (IAM: aiplatform.reasoningEngines.query)

Stream generate content

Generates content as a stream using Google Vertex AI.

cloud-platform (IAM: aiplatform.endpoints.predict)

Stream generate content (Generic)

Streams generated content using the Gemini API in Google Vertex AI, with an endpoint path and request payload you define.

cloud-platform (IAM: aiplatform.endpoints.predict for streamGenerateContent endpoints)

Stream invoke Agent

Invokes an agent deployed in Google Vertex AI Agent Engine and streams its response.

cloud-platform (IAM: aiplatform.reasoningEngines.query)