Use this app to create a Discord source that emits messages from your guild to a Pipedream workflow.
The Discord API interacts seamlessly with Pipedream, empowering you to craft customized automations and workflows for your Discord server. With this powerful integration, you can automate tasks like message posting, user management, and notifications, based on a myriad of triggers and actions from different apps. These automations can enhance the Discord experience for community moderators and members, by synchronizing with external tools, organizing community engagement, and streamlining notifications.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
discord: {
type: "app",
app: "discord",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://discord.com/api/users/@me`,
headers: {
Authorization: `Bearer ${this.discord.$auth.oauth_access_token}`,
"accept": `application/json`,
},
})
},
})
The Nudgify API lets you create and manage social proof notifications, aimed at increasing user engagement and conversions on your website. By leveraging this API on Pipedream, you can automate the interaction with Nudgify notifications and integrate them into your site's workflow. This could include creating notifications based on user behavior, updating them in real-time as data changes, or deleting them once they're no longer needed. The Pipedream platform simplifies the process of working with the Nudgify API by handling authentication, providing a code-free interface for setting up workflows, and enabling connections with numerous other apps for extended functionality.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
nudgify: {
type: "app",
app: "nudgify",
}
},
async run({steps, $}) {
const data = {
"site_key": `${this.nudgify.$auth.site_key}`,
"conversions": [{
"date":"2021-04-15 04:29:42",
"email":"john0941034@gmail.com",
"first_name":"John",
"last_name":"Mendes",
"ip":"92.21.8.106",
"city":"Houston",
"state":"Texas",
"country":"US"
}],
}
return await axios($, {
method: "POST",
url: `https://app.nudgify.com/api/conversions`,
headers: {
Authorization: `Bearer ${this.nudgify.$auth.api_key}`,
"content-type": `application/json`,
"accept": `application/json`,
},
data,
})
},
})