# Get Profile Event Activity — Mixpanel (Service Account)

> Get the chronological event feed for one or more specific users - what they did, when, and with which event properties. This is the "what has this user been doing?" tool. Requires exact distinct_id values; it cannot search by email. Note…

- Key: `mixpanel_service_account-get-profile-event-activity`
- Type: Action (Read-only)
- Version: 0.0.1
- App: Mixpanel (Service Account) (`mixpanel_service_account`) — https://pipedream.com/apps/mixpanel-service-account.md
- This page (HTML): https://pipedream.com/apps/mixpanel-service-account/actions/get-profile-event-activity
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/mixpanel_service_account/actions/get-profile-event-activity/get-profile-event-activity.mjs

## Description

Get the chronological event feed for one or more specific users - what they did, when, and with which event properties. This is the "what has this user been doing?" tool. Requires exact `distinct_id` values; it cannot search by email. Note that Mixpanel has placed the underlying `/stream/query` endpoint in maintenance mode. [See the documentation](https://docs.mixpanel.com/reference/activity-stream-query)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `distinctIds` | `string[]` | Yes | One or more Mixpanel distinct_id values identifying the user profiles to look up. Use Query Profiles to find distinct_id values by email or any other profile property. |
| `fromDate` | `string` | Yes | Start of the query window in YYYY-MM-DD format (for example, 2026-07-01). Inclusive, and interpreted in the project's timezone. |
| `toDate` | `string` | Yes | End of the query window in YYYY-MM-DD format (for example, 2026-07-29). Inclusive, and interpreted in the project's timezone. |
| `workspaceId` | `integer` | No | The ID of the Data View to query. Only needed for projects that use Data Views; leave it empty otherwise. It is the segment after /view/ in a project URL such as https://mixpanel.com/project/1234/view/5678/app/boards. |

## 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": "mixpanel_service_account",
      },
    },
  },
)

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: "mixpanel_service_account-get-profile-event-activity",
  arguments: {
    distinctIds: ["Distinct IDs"],
    fromDate: "From Date",
  },
})
```

**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: "mixpanel_service_account-get-profile-event-activity",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mixpanel_service_account: { authProvisionId: "apn_xxxxxxx" },
    distinctIds: ["Distinct IDs"],
    fromDate: "From Date",
  },
})

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": "mixpanel_service_account-get-profile-event-activity",
    "configured_props": {
      "mixpanel_service_account": { "authProvisionId": "apn_xxxxxxx" },
      "distinctIds": ["Distinct IDs"],
      "fromDate": "From Date"
    }
  }'
```

---

- App: https://pipedream.com/apps/mixpanel-service-account.md · All apps: https://pipedream.com/apps
