import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
slack_v2: {
type: "app",
app: "slack_v2",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://slack.com/api/users.profile.get`,
headers: {
Authorization: `Bearer ${this.slack_v2.$auth.oauth_access_token}`,
},
})
},
})
Emit new events on new Slack interactivity events sourced from Block Kit interactive elements, Slash commands, or Shortcuts
Emit new event when a specific keyword is mentioned in a channel
Emit new event when a new message is posted to one or more channels
Emit new event when a member has added an emoji reaction to a message
Suspend the workflow until approved by a Slack message. See the documentation
Configure custom blocks and send to a channel, group, or user. See the documentation
Slack uses OAuth authentication. When you connect your Slack account, Pipedream will open a popup window where you can sign into Slack and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Slack API.
Pipedream requests the following authorization scopes when you connect your account:
chat:write
chat:write.customize
chat:write.public
files:read
GET
https://slack.com/oauth/v2/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.comma_separated_scopes}}
&
user_scope={{oauth.comma_separated_additional_scopes}}
POST
https://slack.com/api/oauth.v2.access
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
&
redirect_uri={{oauth.redirect_uri}}