How to connect Google Data Studio to Composio

3 min read

Composio connects AI agents to Google Data Studio so they can find reports and data sources and manage the sharing permissions your organization allows.

Use your own Google OAuth app to control its credentials and the permissions your workflow requests.

Use a Google Workspace or Cloud Identity organization. A Workspace administrator must authorize your OAuth client for the Data Studio API.

Part 1. Set up your Google OAuth app

Step 1. Select a project and enable the API

Open Google Cloud Console and select the project that will own your OAuth client.

Choose the Google Cloud project that owns your OAuth app

In APIs & Services → Library, find the service for your workflow. Enable the Data Studio API (datastudio.googleapis.com) in the Cloud project for your OAuth client.

Step 2. Configure branding and audience

Open Google Auth Platform → Branding. Enter an app name, support email, and developer contact details.

Set up app branding and contact information

Under Audience, choose the audience that matches your users. For an external app in Testing, add the accounts you will use under Test users.

Choose the audience and add test users when needed

Step 3. Choose permissions for your workflow

Your Workspace administrator authorizes the Data Studio scopes in the Admin console after you create your client. Google instructs you to keep those scopes out of the OAuth client’s Data Access setup.

The asset-search example uses datastudio.readonly. The OpenID identity scopes shown here are from Composio’s default account-identification setup. Request the scopes that match your workflow and that your organization has authorized.

The example requests https://www.googleapis.com/auth/datastudio.readonly, openid, email, profile. Choose scopes for the actions you plan to use.

Data Studio API setup and admin authorization

Step 4. Create the OAuth client

Open Google Auth Platform → Clients, select Create client, and choose Web application.

Choose Web application for the OAuth client

Under Authorized redirect URIs, add the production callback used by the Composio auth form.

https://backend.composio.dev/api/v1/auth-apps/add

Register the Composio production redirect URI

Select Create. Save the client ID and copy or download the client secret before you close the dialog. Google shows the full secret once. Store it privately.

Find the OAuth client settings after creation

Step 5. Complete the provider prerequisite

Have your Workspace administrator open Security → Access and data control → API controls → Manage Domain Wide Delegation. Under API clients, select Add new, enter the OAuth client ID, add the scopes your app needs, and authorize the client. Follow Google’s Data Studio instructions when configuring this organization-wide grant.

Part 2. Connect Google Data Studio in Composio

Step 1. Create an auth config

In the Composio dashboard, open Auth Configs → Create and select Google Data Studio. Enter a config name and choose Next.

Select OAuth 2.0 if prompted. Choose Your Own Credentials when that option appears. Enter your client ID and client secret, verify the redirect URI, and select the scopes your workflow requires. Then select Create Auth Config.

Step 2. Authorize the account

Open the auth config and select Connect Account. Sign in with a Google account that meets the prerequisites above and review the permissions before you continue.

If Google reports invalid_scope, ask the Workspace administrator to check the authorized client ID and scope list. Confirm that the connected Google account belongs to the authorized organization.

Step 3. Verify the connection

Return to the auth config and check that the connected account shows Active in Accounts.

Before using the app in production

Review Google’s verification requirements for the audience and scopes you chose. External apps in Testing can receive refresh tokens that expire after seven days. Check the requirements for your app before inviting production users.

Google OAuth verification

Share