View as Markdown
Mixpanel (Service Account) icon

Mixpanel (Service Account) ACTION

Query Funnel Report

Get conversion numbers for a funnel that has already been saved in the Mixpanel UI: step counts, conversion rates, and average time between steps. Note that Mixpanel has placed the Funnels Query API in maintenance mode and recommends against new use of it - to build a new integration, save a Funnels report in the Mixpanel UI and read it with Query Insights Report instead. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Mixpanel (Service Account) account once, then configure and run Query Funnel Report from your backend or agent.

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-query-funnel-report",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mixpanel_service_account: { authProvisionId: "apn_xxxxxxx" },
    funnelId: 10,
    fromDate: "From Date",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Query Funnel Report inputs
Property Type Description
funnelId Funnel ID integer
The numeric ID of the saved funnel to query, for example 7509. Use List Saved Funnels to find it.
Required
fromDate From Date string
Start of the query window in YYYY-MM-DD format (for example, 2026-07-01). Inclusive, and interpreted in the project's timezone.
Required
toDate To Date string
End of the query window in YYYY-MM-DD format (for example, 2026-07-29). Inclusive, and interpreted in the project's timezone.
Required
conversionWindowLength Conversion Window Length integer
How long a user has to finish the funnel after triggering its first step, counted in Conversion Window Unit. May not exceed 90 days. Defaults to whatever was saved with the funnel in the Mixpanel UI.
Optional
conversionWindowUnit Conversion Window Unit string
The unit that Conversion Window Length is counted in: second, minute, hour, or day. For example, day with a Conversion Window Length of 7 gives users a week to convert. Defaults to whatever was saved with the funnel in the Mixpanel UI.
Optional
unit Unit string
The unit that Interval is counted in: day, week, or month. For example, Unit week with an Interval of 4 gives four-week buckets.
Optional
interval Interval integer
How many Unit values each bucket in the returned series covers, for example 7. Defaults to 1.
Optional
on Segment On string
A segmentation expression to break the results down by. Example: properties["$city"]. Use List Event Properties to discover property names. See the expression syntax
Optional
where Where string
A segmentation expression that filters which events are counted. Example: properties["$browser"] == "Chrome". Use List Event Properties to discover property names and List Event Property Values to discover the values they take. See the expression syntax
Optional
limit Limit integer
The maximum number of segment values to return. Defaults to 255. Has no effect unless Segment On is set.
Optional
workspaceId Workspace ID integer
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.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
mixpanel_service_account-query-funnel-report
Version
0.0.1
App
Mixpanel (Service Account)
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes