with Sendbird AI chabot and Alt Text Generator AI?
Emit new event when a new webhook event is received.
Sends a bot message to a group channel. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
sendbird_ai_chabot: {
type: "app",
app: "sendbird_ai_chabot",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api-${this.sendbird_ai_chabot.$auth.application_id}.sendbird.com/v3/bots`,
headers: {
"Accept": `application/json`,
"Api-Token": `${this.sendbird_ai_chabot.$auth.api_token}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
alt_text_generator_ai: {
type: "app",
app: "alt_text_generator_ai",
}
},
async run({steps, $}) {
const data = {
"image": `https://alttextgeneratorai.com/_next/image?url=%2Fhero1.jpg&w=1080&q=75`,
"wpkey": `${this.alt_text_generator_ai.$auth.api_key}`,
}
return await axios($, {
method: "post",
url: `https://alttextgeneratorai.com/api/wp`,
data,
})
},
})