with Pumble and BotPenguin?
Emit new event when a user interacts with the bot and a new contact or lead is created.
Emit new event for each new incoming message from a user.
Emit new event when a message is posted in the specified channel in Pumble
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
pumble: {
type: "app",
app: "pumble",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://pumble-api-keys.addons.marketplace.cake.com/listChannels`,
headers: {
"Api-Key": `${this.pumble.$auth.api_key}`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
botpenguin: {
type: "app",
app: "botpenguin",
}
},
async run({steps, $}) {
const data = [
{
"profile": {
"userDetails": {
"name": "BPTest",
"contact": {
"email": "test@example.com",
"phone": {
"number": "90123456789",
"prefix": "91"
}
},
"tags": [],
"attributes": [],
"userProvidedName": "BPTest"
}
}
}
]
return await axios($, {
method: "post",
url: `https://api.v7.botpenguin.com/inbox/users/import`,
headers: {
Authorization: `Bearer ${this.botpenguin.$auth.access_token}`,
"botid": `${this.botpenguin.$auth.bot_id}`,
"authtype": `Key`,
},
data,
})
},
})