Interact with Slack with your own bot user
Slack Bot APIs offer powerful and flexible ways to automate repetitive tasks
and integrate workflows from various services. With the help of these APIs, it
is possible to develop Slack bots capable of exiting and entering specific
channels as well as performing various actions requested from users.
A Slack bot can be used to automate specific tasks and carry out routine admin
jobs such as checking the team’s working time, organizing team meetings,
managing customer inquiries and so on. These bots can be programmed to inform
the members of the team when tasks are completed. Some of the examples of what
you can create using the Slack Bot APIs are:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
slack_bot: {
type: "app",
app: "slack_bot",
},
},
async run({steps, $}) {
return await axios($, {
url: `https://slack.com/api/auth.test`,
headers: {
Authorization: `Bearer ${this.slack_bot.$auth.bot_token}`,
},
method: 'post',
})
},
})
The Pipedream Discord app enables you to build event-driven workflows that interact with the Discord API. When you authorize the Pipedream app's access to your guilds, you can use Pipedream workflows to perform common Discord actions, or write your own code against the Discord API.
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`,
},
})
},
})