with Octagon and ServiceNow?
import OpenAI from 'openai';
export default defineComponent({
props: {
octagon: {
type: "app",
app: "octagon",
}
},
async run({ steps, $ }) {
const client = new OpenAI({
apiKey: this.octagon.$auth.api_key,
baseURL: "https://api-gateway.octagonagents.com/v1",
});
return await client.responses.create({
model: "octagon-agent",
input: "Retrieve year-over-year growth in key income-statement items for AAPL, limited to 5 records and filtered by period FY."
});
},
})
The ServiceNow API lets developers access and manipulate records, manage workflows, and integrate with other services on its IT service management platform. These capabilities support automating tasks, syncing data across platforms, and boosting operational efficiencies.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
servicenow: {
type: "app",
app: "servicenow",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.servicenow.$auth.instance_name}.service-now.com/api/now/table/incident`,
headers: {
Authorization: `Bearer ${this.servicenow.$auth.oauth_access_token}`,
},
})
},
})