with Serenity* AI Hub and GoZen Growth?
Create or update a contact a on Gozen Growth. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
serenity_ai_hub: {
type: "app",
app: "serenity_ai_hub",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.serenitystar.ai/api/v2/Account`,
headers: {
"content-type": `application/json-patch+json`,
"x-api-key": `${this.serenity_ai_hub.$auth.api_key}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
gozen_growth: {
type: "app",
app: "gozen_growth",
}
},
async run({steps, $}) {
const data = {
"contact" :{
"first_name" : "John",
"email_address" : "john@example.com"
}
}
return await axios($, {
method: "post",
url: `${this.gozen_growth.$auth.webhook_url}`,
headers: {
"Authorization": `${this.gozen_growth.$auth.authentication_token}`,
},
data,
})
},
})