with Refiner and Membado?
Emit new event whenever a user enters a segment in Refiner. See the documentation
Emit new event whenever a user completes a survey in Refiner. See the documentation
Identify a user with user ID or email. If the user does not exist, a new one will be created. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
refiner: {
type: "app",
app: "refiner",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.refiner.io/v1/account`,
headers: {
Authorization: `Bearer ${this.refiner.$auth.api_key}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
membado: {
type: "app",
app: "membado",
}
},
async run({steps, $}) {
const data = {
"apikey": `${this.membado.$auth.api_key}`,
"mail": `sergio@pipekit.com`,
}
return await axios($, {
method: "post",
url: `https://www.membado.io/api/${this.membado.$auth.user_identifier}/add-member`,
headers: {
"content-type": `application/x-www-form-urlencoded`,
},
data,
})
},
})