Setu Recipes: reusable digital workers across every app.Browse templates

Integrations / Mixpanel

Mixpanel

Product analytics: event counts over time, top events, event properties and saved Insights reports (US data residency).

5 actions API key 5 read0 write Calls mixpanel.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "mixpanel" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

This toolkit uses a single credential and requests no scopes.

Actions

List event property valuesreadmixpanel.event_property_valuesList the most common values of one property of one event.
InputTypeDescription
project_idintegerRequiredMixpanel project id (Project Settings)
eventstringRequiredSingle event name
namestringRequiredProperty name
limitintegerOptionalMaximum values to return (default 255)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "mixpanel.event_property_values",
  input: {
    "project_id": 1,
    "event": "<event>",
    "name": "<name>"
  },
});
Get Insights reportreadmixpanel.get_insights_reportRun a saved Insights report by its bookmark id (the number in the report URL) and return its series.
InputTypeDescription
project_idintegerRequiredMixpanel project id (Project Settings)
bookmark_idintegerRequiredInsights report id from the report URL
TypeScript
await setu.execute({
  userId: "user_1",
  action: "mixpanel.get_insights_report",
  input: {
    "project_id": 1,
    "bookmark_id": 1
  },
});
List top event namesreadmixpanel.list_event_namesList the most common event names in the project over the last 31 days.
InputTypeDescription
project_idintegerRequiredMixpanel project id (Project Settings)
typestringRequiredAnalysis type
limitintegerOptionalMaximum names to return (default 255)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "mixpanel.list_event_names",
  input: {
    "project_id": 1,
    "type": "<type>"
  },
});
Event segmentationreadmixpanel.segmentation_queryCount an event over a date range, bucketed by day, hour or month, as totals, uniques or averages.
InputTypeDescription
project_idintegerRequiredMixpanel project id (Project Settings)
eventstringRequiredSingle event name
from_datestringRequiredStart date, yyyy-mm-dd
to_datestringRequiredEnd date, yyyy-mm-dd
unitstringOptionalTime bucket
typestringOptionalCounting method
TypeScript
await setu.execute({
  userId: "user_1",
  action: "mixpanel.segmentation_query",
  input: {
    "project_id": 1,
    "event": "<event>",
    "from_date": "<from_date>",
    "to_date": "<to_date>"
  },
});
List top event propertiesreadmixpanel.top_event_propertiesList the most common property names of one event, with how many events carry each.
InputTypeDescription
project_idintegerRequiredMixpanel project id (Project Settings)
eventstringRequiredSingle event name
limitintegerOptionalMaximum properties to return (default 10)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "mixpanel.top_event_properties",
  input: {
    "project_id": 1,
    "event": "<event>"
  },
});