with Predis.ai and Autotask PSA?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
predis_ai: {
type: "app",
app: "predis_ai",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://brain.predis.ai/predis_api/v1/get_posts/`,
headers: {
"authorization": `${this.predis_ai.$auth.api_key}`,
},
params: {
brand_id: `${this.predis_ai.$auth.brand_id}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
autotask_psa: {
type: "app",
app: "autotask_psa",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.autotask_psa.$auth.url}V1.0/ClientPortalUsers/query`,
headers: {
"UserName": `${this.autotask_psa.$auth.username}`,
"Secret": `${this.autotask_psa.$auth.password}`,
"ApiIntegrationCode": `${this.autotask_psa.$auth.api_integration_code}`,
},
params: {
search: `{
"filter": [
{
"op": "gt",
"field": "id",
"value": "1"
}
]
}`,
},
})
},
})