with SnatchBot and Air?
Emit new event when a new bot message is sent. See the documentation
Post a new message and receive a response from your bot. See the documentation
The SnatchBot API provides a programmatic window to SnatchBot's chatbot platform, allowing you to manage and interact with your bots outside of the SnatchBot interface. With this API, you can execute tasks like sending messages, retrieving chat history, and managing your bot's structure and behavior. When integrated into Pipedream workflows, the SnatchBot API shines in automating interactions, syncing chat data with other systems, and reacting to events with custom logic and third-party services.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
snatchbot: {
type: "app",
app: "snatchbot",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://account.snatchbot.me/channels/api/api/id${this.snatchbot.$auth.bot_id}/app${this.snatchbot.$auth.app_id}/aps${this.snatchbot.$auth.app_secret}`,
params: {
user_id: `{your_user_id}`,
message_id: `{your_message_id}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
air: {
type: "app",
app: "air",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.air.inc/v1/assets`,
headers: {
"accept": `application/json`,
"x-api-key": `${this.air.$auth.api_key}`,
"x-air-workspace-id": `${this.air.$auth.workspace_id}`,
},
})
},
})