MixpanelSlack

Post a daily Mixpanel metric to a Slack channel

A Mixpanel + Slack agent flow

Yesterday's signups, activations, or funnel conversion sit in Mixpanel behind a query someone has to remember to run. Posted to a Slack channel each morning, the number reaches the whole team without anyone opening the report. The agent runs the metric with Run-Query, reads the result, and posts a one-line summary to a channel with conversations_add_message. Mixpanel answers when the agent queries it, so this fires once a day on the schedule you set, and because each run posts the latest value, there's no dedupe to manage, just a fresh number on a fixed beat.

The flow

MixpanelRun-Query

Run an analytics query (events, funnels, flows, retention, segmentation) against your Mixpanel data.

Slackconversations_add_message

Posts a message to a public channel, private channel, or DM (disabled by default).

Step by step

  1. Write the query and pick the channel

    Decide the Mixpanel query that captures the metric, for example a daily signup count or a two-step funnel rate, and the Slack channel the digest posts to.

  2. Run the metric

    The agent calls Run-Query with the query definition for the period, usually yesterday, and reads the scalar or small result set it returns. Use Get-Query-Schema first if you need the query shape.

  3. Post the digest

    It calls conversations_add_message with a one-line summary naming the metric, its value, and the comparison to the day before if you ask the agent to run a second query for that.

Tell your agent

Every weekday at 9am, run a Mixpanel query for yesterday's signup count and the day before. Post a single message to the Slack channel 'metrics' reading the signup count, the prior day's count, and the percent change. Post one message per day.

Setup

This flow needs both servers connected to your agent. Follow each install guide:

Worth knowing

  • conversations_add_message is disabled by default on the Slack server. Enable it for the agent and confirm the bot is in the target channel, or the post is rejected.
  • Run-Query needs a valid query definition; an off-shape query returns an error, not a number. Have the agent fetch Get-Query-Schema once so it constructs the query correctly.
  • Mixpanel data for the current day is incomplete until events settle. Query yesterday rather than today, or the morning number undercounts.

Questions

Can it post a funnel rate, not just a count?
Yes. Run-Query supports funnels, so the agent runs the funnel definition and posts the conversion rate. Keep the message to the headline number and link to Mixpanel for the breakdown.
Why a scheduled digest rather than an alert on a threshold?
A digest is the simple daily case. For a threshold alert, the agent compares the query result to a bound and posts only on a breach, the same pattern with a conditional instead of a fixed schedule.