with Mixpanel and Databricks (OAuth - Service Principal)?
Mixpanel's API allows you to track user interactions with your web and mobile applications, providing insights through data analysis. You can capture events, update user profiles, and segment data based on user actions. Integrating Mixpanel with Pipedream enables you to automate responses to these events, sync data across services, and trigger workflows that can enhance user engagement and improve retention.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
mixpanel: {
type: "app",
app: "mixpanel",
}
},
async run({steps, $}) {
const data = `data={
"event": "Pipedream test event",
"properties": {
"token": "${this.mixpanel.$auth.token}"
}
}`
return await axios($, {
method: "post",
url: `https://api.mixpanel.com/track#live-event`,
headers: {
"Content-Type": `application/x-www-form-urlencoded`,
},
data,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
databricks_oauth: {
type: "app",
app: "databricks_oauth",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.databricks_oauth.$auth.domain}.cloud.databricks.com/api/2.0/clusters/list`,
headers: {
Authorization: `Bearer ${this.databricks_oauth.$auth.oauth_access_token}`,
},
})
},
})