with BotPenguin and Zoho FMS?
Adds a new WhatsApp contact to your BotPenguin account. See the documentation
Updates custom attributes for a specific contact in your BotPenguin account.
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,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
zoho_fms: {
type: "app",
app: "zoho_fms",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://fsm.${this.zoho_fms.$auth.api_domain}/fsm/v1/users`,
headers: {
Authorization: `Bearer ${this.zoho_fms.$auth.oauth_access_token}`,
},
})
},
})