Stream your Mixpanel events to Slack in real-time
npm install mixpanel-to-slack --save
Get your API_SECRET from the Mixpanel dashboard of your project. Get your SLACK_WEBHOOK_URI from Slack's apps dashboard
const mixpanelToSlack =const slackWebhookUri = 'SLACK_WEBHOOK_URI'const mixpanelApiSecret = 'API_SECRET'const interval = 5000const filter =properties'email' &&properties'$browser' === 'Chrome' &&properties'$current_url'const map =$tseventpropertiesconst channel = '#mixpanel-to-slack'
filter method controls which events should be sent to Slack. The following example only streams events that has
$current_url has a substring of
map method controls what will be sent. In this example we send the
$ts which is the timestamp,
event which is the event name, and
properties which are the entire properties attached to the event.
interval is set to every 5 seconds (5000ms)
channel is the channel at Slack to send messages to. Leave empty for the default channel configured for the Slack webhook URI. Must be an existing channel.
Frequently Asked Questions
Is this affiliated or endorsed by Mixpanel?
No. This project is not affiliated or endorsed by Mixpanel.
Is this affiliated or endorsed by Slack?
No. This project is not affiliated or endorsed by Slack.