# New Admin Activity By User — Google Workspace Admin

> Emit new admin activities by selected user

- Key: `google_workspace-new-admin-activity-by-user`
- Type: Trigger (Polling)
- Version: 0.0.5
- App: Google Workspace Admin (`google_workspace`) — https://pipedream.com/apps/google-workspace.md
- This page (HTML): https://pipedream.com/apps/google-workspace/triggers/new-admin-activity-by-user
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/google_workspace/sources/new-admin-activity-by-user/new-admin-activity-by-user.ts

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `timer` | `$.interface.timer` | Yes | How often you want to check if the Webhook has already expired |
| `eventName` | `string` | No | The name of the event being queried by the API. Each Event Name is related to a specific Google Workspace service or feature which the API organizes into types of events. An example is the Google Calendar events in the Admin console application's reports. The Calendar Settings type structure has all of the Calendar Event Name activities reported by the API. When an administrator changes a Calendar setting, the API reports this activity in the Calendar Settings type and Event Name parameters. For more information about Event Name query strings and parameters, see the list of event names for various applications above in Application Name. For more details on this parameter see the docs here |
| `userKey` | `string` | Yes | Represents the profile ID or the user email for which the data should be filtered. Unique Google Workspace profile ID or their primary email address. Must not be a deleted user. For more details on this parameter see the docs here Options are loaded from the connected account. |

## Returns

Events emitted by Google Workspace Admin.

## Run it

**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 deployed = await pd.triggers.deploy({
  id: "google_workspace-new-admin-activity-by-user",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_workspace: { authProvisionId: "apn_xxxxxxx" },
    timer: { "intervalSeconds": 900 },
    eventName: "Event Name",
  },
  webhookUrl: "https://example.com/webhooks/google-workspace",
})

console.log(deployed.id)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/triggers/deploy \
  -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-new-admin-activity-by-user",
    "webhook_url": "https://example.com/webhooks/google-workspace",
    "configured_props": {
      "google_workspace": { "authProvisionId": "apn_xxxxxxx" },
      "timer": { "intervalSeconds": 900 },
      "eventName": "Event Name"
    }
  }'
```

**MCP**

MCP servers expose Google Workspace Admin actions as on-demand tools.

New Admin Activity By User is an event source, so your application deploys it with the Connect SDK or API and then either receives each event at a webhook URL or retrieves events on demand with the trigger events API.

## Event delivery

Every event is sent to the HTTP endpoint you choose when you deploy the source. Or: no webhook required — your app or agent can fetch recent events from the [trigger events API](https://pipedream.com/docs/connect/api-reference/list-trigger-events.md) instead.

---

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