# Google Workspace Admin — Pipedream Connect

> Business apps & collaboration tools

- API slug: `google_workspace` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Developer Tools
- Website: https://workspace.google.com
- Managed OAuth scopes: `email` · `profile` · `https://www.googleapis.com/auth/admin.directory.user.security` · `https://apps-apis.google.com/a/feeds/alias/` · `https://www.googleapis.com/auth/admin.directory.user` · `https://www.googleapis.com/auth/admin.directory.user.alias` · `https://www.googleapis.com/auth/cloud-platform` · `https://www.googleapis.com/auth/admin.directory.device.chromeos` · `https://www.googleapis.com/auth/admin.directory.customer` · `https://www.googleapis.com/auth/admin.directory.domain` · `https://www.googleapis.com/auth/admin.directory.domain.readonly` · `https://apps-apis.google.com/a/feeds/groups/` · `https://www.googleapis.com/auth/admin.directory.group` · `https://www.googleapis.com/auth/admin.directory.group.member` · `https://www.googleapis.com/auth/admin.directory.device.mobile` · `https://www.googleapis.com/auth/admin.directory.device.mobile.action` · `https://apps-apis.google.com/a/feeds/policies/` · `https://www.googleapis.com/auth/admin.directory.orgunit` · `https://www.googleapis.com/auth/admin.directory.orgunit.readonly` · `https://www.googleapis.com/auth/admin.directory.rolemanagement` · `https://apps-apis.google.com/a/feeds/calendar/resource/` · `https://www.googleapis.com/auth/admin.directory.resource.calendar` · `https://www.googleapis.com/auth/admin.directory.userschema` · `https://www.googleapis.com/auth/admin.reports.audit.readonly`
- This page (HTML): https://pipedream.com/apps/google-workspace
- Tools: 4 actions · 4 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: google_workspace`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "google_workspace",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run List Activities By Admin:
const result = await mcp.callTool({
  name: "google_workspace-list-activities-by-admin",
  arguments: {
    applicationName: "Application Name",
    userKey: "User Key",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Google Workspace Admin endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://www.googleapis.com/oauth2/v1/userinfo

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vb2F1dGgyL3YxL3VzZXJpbmZv?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "google_workspace-list-activities-by-admin",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_workspace: { authProvisionId: "apn_xxxxxxx" },
    applicationName: "Application Name",
    userKey: "User Key",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (4)

### `google_workspace-list-activities-by-admin` — List Activities By Admin (Read-only)

Retrieves a report of all Admin console activities done by a specific administrator. See the docs for more information

Full schema: https://pipedream.com/apps/google-workspace/actions/list-activities-by-admin.md

### `google_workspace-list-activities-by-event-name` — List Activities By Event Name (Read-only)

Retrieves a report of all activities for a specific event name. See the docs for more information

Full schema: https://pipedream.com/apps/google-workspace/actions/list-activities-by-event-name.md

### `google_workspace-list-activities-by-event-and-admin` — List Activities By Event Name and Admin (Read-only)

Retrieves a report of all activities for a specific event name and admin. See the docs for more information

Full schema: https://pipedream.com/apps/google-workspace/actions/list-activities-by-event-and-admin.md

### `google_workspace-list-all-activities` — List All Activities (Read-only)

Retrieves a report of all administrative activities done for an account. See the docs for more information

Full schema: https://pipedream.com/apps/google-workspace/actions/list-all-activities.md

## Triggers (4)

### `google_workspace-new-admin-activity` — New Admin Activity (Polling)

Emit new admin activities

Full schema: https://pipedream.com/apps/google-workspace/triggers/new-admin-activity.md

### `google_workspace-new-admin-activity-by-app-name` — New Admin Activity By Application Name (Polling)

Emit new admin activities by selected user

Full schema: https://pipedream.com/apps/google-workspace/triggers/new-admin-activity-by-app-name.md

### `google_workspace-new-admin-activity-by-user` — New Admin Activity By User (Polling)

Emit new admin activities by selected user

Full schema: https://pipedream.com/apps/google-workspace/triggers/new-admin-activity-by-user.md

### `google_workspace-new-admin-activity-by-user-and-app-name` — New Admin Activity By User And Application Name (Polling)

Emit new admin activities by selected user and application name

Full schema: https://pipedream.com/apps/google-workspace/triggers/new-admin-activity-by-user-and-app-name.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
