Interact with Slack with your own bot user
Emit new event when a message is posted in a direct message channel (Bot). To open a conversation, use the Pipedream Action "Send a Direct Message" to send a message from the Bot, or enable direct messages to the Bot in your App Settings (Settings->App Home->Show Tabs->Messages Tab), and send a direct message to the Bot.
Emit new event when a new message is posted to a public, private or group channel (Bot)
Add or update a single record in your Pipedream Data Store.
Add or update multiple records to your Pipedream Data Store.
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',
})
},
})
With the Data Stores API, you can build applications that:
export default defineComponent({
props: {
myDataStore: {
type: "data_store",
},
},
async run({ steps, $ }) {
await this.myDataStore.set("key_here","Any serializable JSON as the value")
return await this.myDataStore.get("key_here")
},
})