with Cloudpresenter and OneSignal (REST API)?
Emit new event when a user adds a new contact in Cloudpresenter.
Creates a new contact within the Cloudpresenter application. See the documentation
Updates an existing contact within the Cloudpresenter application. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
cloudpresenter: {
type: "app",
app: "cloudpresenter",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api2.cloudpresenter.com/v1/contacts`,
headers: {
Authorization: `Bearer ${this.cloudpresenter.$auth.oauth_access_token}`,
"origin": `${this.cloudpresenter.$auth.api_base_url}`,
"workspace": `${this.cloudpresenter.$auth.workspace_id}`,
},
})
},
})
OneSignal's REST API enables developers to automate the delivery of push notifications, manage users and segments, and gather analytics to refine communication strategies. By integrating OneSignal with Pipedream, you can orchestrate complex workflows that react to events or schedules, synchronize user data across platforms, and personalize user engagement with cross-channel marketing tools.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
onesignal_rest_api: {
type: "app",
app: "onesignal_rest_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://onesignal.com/api/v1/players`,
headers: {
"Authorization": `Basic ${this.onesignal_rest_api.$auth.rest_api_key}`,
},
params: {
app_id: `${this.onesignal_rest_api.$auth.app_id}`,
},
})
},
})