with Vitally and MindStudio?
The Vitally API offers a window into customer success operations, enabling you to automate workflows, integrate with other tools, and manipulate customer data programmatically. With Pipedream, you can harness this API to create custom automations that react to events in Vitally, sync data between Vitally and other platforms, or maintain up-to-date customer profiles across your business stack.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
vitally: {
type: "app",
app: "vitally",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.vitally.$auth.subdomain}.rest.vitally.io/resources/users`,
auth: {
username: `${this.vitally.$auth.api_key}`,
password: ``,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
mindstudio: {
type: "app",
app: "mindstudio",
}
},
async run({steps, $}) {
const data = {
"workerId": `${this.mindstudio.$auth.agent_id}`,
"includeBillingCosts": true,
"variables": {
"key1": "value1",
"key2": "value2"
},
"metadata": {
"tags": ["tag1", "tag2"]
},
"workflow": "optional-workflow-name",
"callbackUrl": "https://your-callback-url.com/endpoint"
}
return await axios($, {
method: "post",
url: `https://api.mindstudio.ai/developer/v2/agents/run`,
headers: {
Authorization: `Bearer ${this.mindstudio.$auth.api_key}`,
"content-type": `application/json`,
},
data,
})
},
})