with Teach 'n Go and ServiceTitan?
Creates a new prospect inside Teach 'n Go. See the documentation
Registers a new student in Teach 'n Go. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
teach_n_go: {
type: "app",
app: "teach_n_go",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://app.teachngo.com/globalApis/student_list`,
headers: {
"X-API-KEY": `${this.teach_n_go.$auth.api_key}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
servicetitan: {
type: "app",
app: "servicetitan",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api${this.servicetitan.$auth.environment}servicetitan.io/settings/v2/tenant/${this.servicetitan.$auth.tenant_id}/employees`,
headers: {
Authorization: `Bearer ${this.servicetitan.$auth.oauth_access_token}`,
"st-app-key": `${this.servicetitan.$auth.client_id}`,
},
})
},
})