# List All Activities — Google Workspace Admin

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

- Key: `google_workspace-list-all-activities`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Google Workspace Admin (`google_workspace`) — https://pipedream.com/apps/google-workspace.md
- This page (HTML): https://pipedream.com/apps/google-workspace/actions/list-all-activities
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/google_workspace/actions/list-all-activities/list-all-activities.ts

## Description

Retrieves a report of all administrative activities done for an account. [See the docs](https://developers.google.com/admin-sdk/reports/v1/guides/manage-audit-admin#get_account_events) for more information

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `applicationName` | `string` | Yes | Application name for which the events are to be retrieved. |
| `endTime` | `string` | No | Sets the end of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The default value is the approximate time of the API request. For more details on this parameter see the docs here |
| `startTime` | `string` | No | Sets the beginning of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The report returns all activities from Start Time until End Time. The Start Time must be before the End Time (if specified) and the current time when the request is made, or the API returns an error. For more details on this parameter see the docs here |
| `maxResults` | `integer` | No | Determines how many activity records are shown on each response page. For example, if the request sets maxResults=1 and the report has two activities, the report has two pages. The response's nextPageToken property has the token to the second page. The Max Results query string is optional in the request. The default value is 1000. For more details on this parameter see the docs here |
| `filters` | `string` | No | The filters query string is a comma-separated list composed of event parameters manipulated by relational operators. Event parameters are in the form {parameter1 name}{relational operator}{parameter1 value},{parameter2 name}{relational operator}{parameter2 value},..... For more details on this parameter see the docs here |

## Run it

**MCP**

```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()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "google_workspace-list-all-activities",
  arguments: {
    applicationName: "Application Name",
    endTime: "End Time",
  },
})
```

**TypeScript**

```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-all-activities",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_workspace: { authProvisionId: "apn_xxxxxxx" },
    applicationName: "Application Name",
    endTime: "End Time",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "google_workspace-list-all-activities",
    "configured_props": {
      "google_workspace": { "authProvisionId": "apn_xxxxxxx" },
      "applicationName": "Application Name",
      "endTime": "End Time"
    }
  }'
```

---

- App: https://pipedream.com/apps/google-workspace.md · All apps: https://pipedream.com/apps
