@pipedream/slack_v2 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +41 -0
- package/actions/add-emoji-reaction/add-emoji-reaction.mjs +48 -0
- package/actions/approve-workflow/approve-workflow.mjs +92 -0
- package/actions/archive-channel/archive-channel.mjs +38 -0
- package/actions/common/build-blocks.mjs +182 -0
- package/actions/common/send-message.mjs +264 -0
- package/actions/create-channel/create-channel.mjs +40 -0
- package/actions/create-reminder/create-reminder.mjs +52 -0
- package/actions/delete-file/delete-file.mjs +39 -0
- package/actions/delete-message/delete-message.mjs +45 -0
- package/actions/find-message/find-message.mjs +83 -0
- package/actions/find-user-by-email/find-user-by-email.mjs +32 -0
- package/actions/get-current-user/get-current-user.mjs +68 -0
- package/actions/get-file/get-file.mjs +59 -0
- package/actions/invite-user-to-channel/invite-user-to-channel.mjs +45 -0
- package/actions/kick-user/kick-user.mjs +56 -0
- package/actions/list-channels/list-channels.mjs +52 -0
- package/actions/list-files/list-files.mjs +93 -0
- package/actions/list-group-members/list-group-members.mjs +68 -0
- package/actions/list-members-in-channel/list-members-in-channel.mjs +71 -0
- package/actions/list-replies/list-replies.mjs +74 -0
- package/actions/list-users/list-users.mjs +60 -0
- package/actions/reply-to-a-message/reply-to-a-message.mjs +54 -0
- package/actions/send-block-kit-message/send-block-kit-message.mjs +48 -0
- package/actions/send-large-message/send-large-message.mjs +95 -0
- package/actions/send-message/send-message.mjs +56 -0
- package/actions/send-message-advanced/send-message-advanced.mjs +75 -0
- package/actions/send-message-to-channel/send-message-to-channel.mjs +45 -0
- package/actions/send-message-to-user-or-group/send-message-to-user-or-group.mjs +93 -0
- package/actions/set-channel-description/set-channel-description.mjs +37 -0
- package/actions/set-channel-topic/set-channel-topic.mjs +37 -0
- package/actions/set-status/set-status.mjs +49 -0
- package/actions/update-group-members/update-group-members.mjs +72 -0
- package/actions/update-message/update-message.mjs +59 -0
- package/actions/update-profile/update-profile.mjs +94 -0
- package/actions/upload-file/upload-file.mjs +104 -0
- package/common/constants.mjs +31 -0
- package/package.json +22 -0
- package/slack_v2.app.mjs +1112 -0
- package/sources/common/base.mjs +184 -0
- package/sources/common/constants.mjs +58 -0
- package/sources/new-channel-created/new-channel-created.mjs +32 -0
- package/sources/new-channel-created/test-event.mjs +44 -0
- package/sources/new-interaction-event-received/README.md +85 -0
- package/sources/new-interaction-event-received/new-interaction-event-received.mjs +105 -0
- package/sources/new-interaction-event-received/test-event.mjs +86 -0
- package/sources/new-keyword-mention/new-keyword-mention.mjs +99 -0
- package/sources/new-keyword-mention/test-event.mjs +28 -0
- package/sources/new-message-in-channels/new-message-in-channels.mjs +106 -0
- package/sources/new-message-in-channels/test-event.mjs +45 -0
- package/sources/new-reaction-added/new-reaction-added.mjs +119 -0
- package/sources/new-reaction-added/test-event.mjs +193 -0
- package/sources/new-saved-message/new-saved-message.mjs +32 -0
- package/sources/new-saved-message/test-event.mjs +37 -0
- package/sources/new-user-added/new-user-added.mjs +32 -0
- package/sources/new-user-added/test-event.mjs +48 -0
- package/sources/new-user-mention/new-user-mention.mjs +124 -0
- package/sources/new-user-mention/test-event.mjs +28 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"user": "US676PZLY",
|
|
3
|
+
"type": "message",
|
|
4
|
+
"ts": "1716404766.096289",
|
|
5
|
+
"client_msg_id": "b26387fd-5afe-46a9-bf63-a7aabd6fb40f",
|
|
6
|
+
"text": "hello",
|
|
7
|
+
"team": "TS8319547",
|
|
8
|
+
"blocks": [
|
|
9
|
+
{
|
|
10
|
+
"type": "rich_text",
|
|
11
|
+
"block_id": "aY6KK",
|
|
12
|
+
"elements": [
|
|
13
|
+
{
|
|
14
|
+
"type": "rich_text_section",
|
|
15
|
+
"elements": [
|
|
16
|
+
{
|
|
17
|
+
"type": "text",
|
|
18
|
+
"text": "hello"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"channel": "CS8319KD5",
|
|
26
|
+
"event_ts": "1716404766.096289",
|
|
27
|
+
"channel_type": "channel"
|
|
28
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import common from "../common/base.mjs";
|
|
2
|
+
import constants from "../common/constants.mjs";
|
|
3
|
+
import sampleEmit from "./test-event.mjs";
|
|
4
|
+
import sharedConstants from "../../common/constants.mjs";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
...common,
|
|
8
|
+
key: "slack_v2-new-message-in-channels",
|
|
9
|
+
name: "New Message In Channels (Instant)",
|
|
10
|
+
version: "1.1.0",
|
|
11
|
+
description: "Emit new event when a new message is posted to one or more channels",
|
|
12
|
+
type: "source",
|
|
13
|
+
dedupe: "unique",
|
|
14
|
+
props: {
|
|
15
|
+
...common.props,
|
|
16
|
+
conversations: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
common.props.slack,
|
|
19
|
+
"conversation",
|
|
20
|
+
() => ({
|
|
21
|
+
types: [
|
|
22
|
+
sharedConstants.CHANNEL_TYPE.PUBLIC,
|
|
23
|
+
sharedConstants.CHANNEL_TYPE.PRIVATE,
|
|
24
|
+
],
|
|
25
|
+
}),
|
|
26
|
+
],
|
|
27
|
+
type: "string[]",
|
|
28
|
+
label: "Channels",
|
|
29
|
+
description: "Select one or more channels to monitor for new messages.",
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
// eslint-disable-next-line pipedream/props-description,pipedream/props-label
|
|
33
|
+
slackApphook: {
|
|
34
|
+
type: "$.interface.apphook",
|
|
35
|
+
appProp: "slack",
|
|
36
|
+
async eventNames() {
|
|
37
|
+
return this.conversations || [
|
|
38
|
+
"message",
|
|
39
|
+
];
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
resolveNames: {
|
|
43
|
+
propDefinition: [
|
|
44
|
+
common.props.slack,
|
|
45
|
+
"resolveNames",
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
ignoreBot: {
|
|
49
|
+
propDefinition: [
|
|
50
|
+
common.props.slack,
|
|
51
|
+
"ignoreBot",
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
ignoreThreads: {
|
|
55
|
+
type: "boolean",
|
|
56
|
+
label: "Ignore replies in threads",
|
|
57
|
+
description: "Ignore replies to messages in threads",
|
|
58
|
+
optional: true,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
methods: {
|
|
62
|
+
...common.methods,
|
|
63
|
+
getSummary() {
|
|
64
|
+
return "New message in channel";
|
|
65
|
+
},
|
|
66
|
+
async processEvent(event) {
|
|
67
|
+
if (event.type !== "message") {
|
|
68
|
+
console.log(`Ignoring event with unexpected type "${event.type}"`);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (event.subtype && !constants.ALLOWED_MESSAGE_IN_CHANNEL_SUBTYPES.includes(event.subtype)) {
|
|
72
|
+
// This source is designed to just emit an event for each new message received.
|
|
73
|
+
// Due to inconsistencies with the shape of message_changed and message_deleted
|
|
74
|
+
// events, we are ignoring them for now. If you want to handle these types of
|
|
75
|
+
// events, feel free to change this code!!
|
|
76
|
+
console.log("Ignoring message with subtype.");
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if ((this.ignoreBot) && (event.subtype == "bot_message" || event.bot_id)) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
// There is no thread message type only the thread_ts field
|
|
83
|
+
// indicates if the message is part of a thread in the event.
|
|
84
|
+
if (this.ignoreThreads && event.thread_ts) {
|
|
85
|
+
console.log("Ignoring reply in thread");
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (this.resolveNames) {
|
|
89
|
+
if (event.user) {
|
|
90
|
+
event.user_id = event.user;
|
|
91
|
+
event.user = await this.getUserName(event.user);
|
|
92
|
+
} else if (event.bot_id) {
|
|
93
|
+
event.bot = await this.getBotName(event.bot_id);
|
|
94
|
+
}
|
|
95
|
+
event.channel_id = event.channel;
|
|
96
|
+
event.channel = await this.getConversationName(event.channel);
|
|
97
|
+
if (event.team) {
|
|
98
|
+
event.team_id = event.team;
|
|
99
|
+
event.team = await this.getTeamName(event.team);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return event;
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
sampleEmit,
|
|
106
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"client_msg_id": "1a7b4cd8-7c83-4f6e-92f8-bfbd4f77d888",
|
|
3
|
+
"type": "message",
|
|
4
|
+
"text": "Hello <@U06MDSMHK7B>, I’ve registered the task here: <https://github.com/DreamPipe/Dreampipe/issues/8395>",
|
|
5
|
+
"user": "tuleanphuonghh",
|
|
6
|
+
"ts": "1702506383.129070",
|
|
7
|
+
"blocks": [
|
|
8
|
+
{
|
|
9
|
+
"type": "rich_text",
|
|
10
|
+
"block_id": "Gh1p",
|
|
11
|
+
"elements": [
|
|
12
|
+
{
|
|
13
|
+
"type": "rich_text_section",
|
|
14
|
+
"elements": [
|
|
15
|
+
{
|
|
16
|
+
"type": "text",
|
|
17
|
+
"text": "Hello "
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "user",
|
|
21
|
+
"user_id": "U06MDSMHK7B"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "text",
|
|
25
|
+
"text": ", I’ve registered the task here: "
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "link",
|
|
29
|
+
"url": "https://github.com/DreamPipe/Dreampipe/issues/8395"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"team": "Dreampipe Users",
|
|
37
|
+
"thread_ts": "1702504303.421340",
|
|
38
|
+
"parent_user_id": "U06MDSMHK7B",
|
|
39
|
+
"channel": "support",
|
|
40
|
+
"event_ts": "1702506383.129070",
|
|
41
|
+
"channel_type": "channel",
|
|
42
|
+
"user_id": "U04DXTI5SRG",
|
|
43
|
+
"channel_id": "CPUIZSV6B",
|
|
44
|
+
"team_id": "TNZFYHTCG"
|
|
45
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import common from "../common/base.mjs";
|
|
2
|
+
import sampleEmit from "./test-event.mjs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
...common,
|
|
6
|
+
key: "slack_v2-new-reaction-added",
|
|
7
|
+
name: "New Reaction Added (Instant)",
|
|
8
|
+
version: "1.2.0",
|
|
9
|
+
description: "Emit new event when a member has added an emoji reaction to a message",
|
|
10
|
+
type: "source",
|
|
11
|
+
dedupe: "unique",
|
|
12
|
+
props: {
|
|
13
|
+
...common.props,
|
|
14
|
+
conversations: {
|
|
15
|
+
propDefinition: [
|
|
16
|
+
common.props.slack,
|
|
17
|
+
"conversation",
|
|
18
|
+
],
|
|
19
|
+
type: "string[]",
|
|
20
|
+
label: "Channels",
|
|
21
|
+
description: "Select one or more channels to monitor for new messages.",
|
|
22
|
+
optional: true,
|
|
23
|
+
},
|
|
24
|
+
// eslint-disable-next-line pipedream/props-description,pipedream/props-label
|
|
25
|
+
slackApphook: {
|
|
26
|
+
type: "$.interface.apphook",
|
|
27
|
+
appProp: "slack",
|
|
28
|
+
async eventNames() {
|
|
29
|
+
if (this.conversations?.length) {
|
|
30
|
+
const conversations = [];
|
|
31
|
+
for (const conversation of this.conversations) {
|
|
32
|
+
conversations.push(`reaction_added:${conversation}`);
|
|
33
|
+
}
|
|
34
|
+
return conversations;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return [
|
|
38
|
+
"reaction_added",
|
|
39
|
+
];
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
ignoreBot: {
|
|
43
|
+
propDefinition: [
|
|
44
|
+
common.props.slack,
|
|
45
|
+
"ignoreBot",
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
iconEmoji: {
|
|
49
|
+
propDefinition: [
|
|
50
|
+
common.props.slack,
|
|
51
|
+
"icon_emoji",
|
|
52
|
+
],
|
|
53
|
+
description: "Select one or more emojis to use as a filter. E.g. `fire, email`",
|
|
54
|
+
type: "string[]",
|
|
55
|
+
optional: true,
|
|
56
|
+
},
|
|
57
|
+
includeUserData: {
|
|
58
|
+
label: "Include User Data",
|
|
59
|
+
description: "Include user object in the response. Default `false`",
|
|
60
|
+
type: "boolean",
|
|
61
|
+
optional: true,
|
|
62
|
+
default: false,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
...common.methods,
|
|
67
|
+
getSummary() {
|
|
68
|
+
return "New reaction added";
|
|
69
|
+
},
|
|
70
|
+
async processEvent(event) {
|
|
71
|
+
let iconEmojiParsed = [];
|
|
72
|
+
|
|
73
|
+
try {
|
|
74
|
+
iconEmojiParsed = typeof this.iconEmoji === "string" ?
|
|
75
|
+
JSON.parse(this.iconEmoji) :
|
|
76
|
+
this.iconEmoji;
|
|
77
|
+
} catch (error) {
|
|
78
|
+
iconEmojiParsed = this.iconEmoji.replace(/\s+/g, "").split(",");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (
|
|
82
|
+
((this.ignoreBot) && (event.subtype == "bot_message" || event.bot_id)) ||
|
|
83
|
+
(iconEmojiParsed?.length > 0 && !iconEmojiParsed.includes(event.reaction))
|
|
84
|
+
) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (this.includeUserData) {
|
|
89
|
+
const promises = [
|
|
90
|
+
this.slack.usersInfo({
|
|
91
|
+
user: event.user,
|
|
92
|
+
}),
|
|
93
|
+
];
|
|
94
|
+
if (event.item_user) {
|
|
95
|
+
promises.push(this.slack.usersInfo({
|
|
96
|
+
user: event.item_user,
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
const responses = await Promise.all(promises);
|
|
100
|
+
event.userInfo = responses[0].user;
|
|
101
|
+
if (responses[1]) {
|
|
102
|
+
event.itemUserInfo = responses[1].user;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
try {
|
|
107
|
+
event.message = await this.getMessage({
|
|
108
|
+
channel: event.item.channel,
|
|
109
|
+
event_ts: event.item.ts,
|
|
110
|
+
});
|
|
111
|
+
} catch (err) {
|
|
112
|
+
console.log("Error fetching message:", err);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return event;
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
sampleEmit,
|
|
119
|
+
};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"type": "reaction_added",
|
|
3
|
+
"user": "US676PZLY",
|
|
4
|
+
"reaction": "squirrel",
|
|
5
|
+
"item": {
|
|
6
|
+
"type": "message",
|
|
7
|
+
"channel": "CS8319KD5",
|
|
8
|
+
"ts": "1716405857.659549"
|
|
9
|
+
},
|
|
10
|
+
"item_user": "US676PZLY",
|
|
11
|
+
"event_ts": "1716406183.000100",
|
|
12
|
+
"userInfo": {
|
|
13
|
+
"id": "US676PZLY",
|
|
14
|
+
"team_id": "TS8319547",
|
|
15
|
+
"name": "test.user",
|
|
16
|
+
"deleted": false,
|
|
17
|
+
"color": "9f69e7",
|
|
18
|
+
"real_name": "Test User",
|
|
19
|
+
"tz": "America/New_York",
|
|
20
|
+
"tz_label": "Eastern Daylight Time",
|
|
21
|
+
"tz_offset": -14400,
|
|
22
|
+
"profile": {
|
|
23
|
+
"title": "",
|
|
24
|
+
"phone": "",
|
|
25
|
+
"skype": "",
|
|
26
|
+
"real_name": "Test User",
|
|
27
|
+
"real_name_normalized": "Test User",
|
|
28
|
+
"display_name": "",
|
|
29
|
+
"display_name_normalized": "",
|
|
30
|
+
"fields": null,
|
|
31
|
+
"status_text": "",
|
|
32
|
+
"status_emoji": "",
|
|
33
|
+
"status_emoji_display_info": [],
|
|
34
|
+
"status_expiration": 0,
|
|
35
|
+
"avatar_hash": "g010b11df3bb",
|
|
36
|
+
"email": "test@sample.com",
|
|
37
|
+
"first_name": "Test",
|
|
38
|
+
"last_name": "User",
|
|
39
|
+
"status_text_canonical": "",
|
|
40
|
+
"team": "TS8319547"
|
|
41
|
+
},
|
|
42
|
+
"is_admin": true,
|
|
43
|
+
"is_owner": true,
|
|
44
|
+
"is_primary_owner": true,
|
|
45
|
+
"is_restricted": false,
|
|
46
|
+
"is_ultra_restricted": false,
|
|
47
|
+
"is_bot": false,
|
|
48
|
+
"is_app_user": false,
|
|
49
|
+
"updated": 1703787612,
|
|
50
|
+
"is_email_confirmed": true,
|
|
51
|
+
"has_2fa": false,
|
|
52
|
+
"who_can_share_contact_card": "EVERYONE"
|
|
53
|
+
},
|
|
54
|
+
"itemUserInfo": {
|
|
55
|
+
"id": "US676PZLY",
|
|
56
|
+
"team_id": "TS8319547",
|
|
57
|
+
"name": "test.user",
|
|
58
|
+
"deleted": false,
|
|
59
|
+
"color": "9f69e7",
|
|
60
|
+
"real_name": "Test User",
|
|
61
|
+
"tz": "America/New_York",
|
|
62
|
+
"tz_label": "Eastern Daylight Time",
|
|
63
|
+
"tz_offset": -14400,
|
|
64
|
+
"profile": {
|
|
65
|
+
"title": "",
|
|
66
|
+
"phone": "",
|
|
67
|
+
"skype": "",
|
|
68
|
+
"real_name": "Test User",
|
|
69
|
+
"real_name_normalized": "Test User",
|
|
70
|
+
"display_name": "",
|
|
71
|
+
"display_name_normalized": "",
|
|
72
|
+
"fields": null,
|
|
73
|
+
"status_text": "",
|
|
74
|
+
"status_emoji": "",
|
|
75
|
+
"status_emoji_display_info": [],
|
|
76
|
+
"status_expiration": 0,
|
|
77
|
+
"avatar_hash": "g010b11df3bb",
|
|
78
|
+
"email": "test@sample.com",
|
|
79
|
+
"first_name": "Test",
|
|
80
|
+
"last_name": "User",
|
|
81
|
+
"status_text_canonical": "",
|
|
82
|
+
"team": "TS8319547"
|
|
83
|
+
},
|
|
84
|
+
"is_admin": true,
|
|
85
|
+
"is_owner": true,
|
|
86
|
+
"is_primary_owner": true,
|
|
87
|
+
"is_restricted": false,
|
|
88
|
+
"is_ultra_restricted": false,
|
|
89
|
+
"is_bot": false,
|
|
90
|
+
"is_app_user": false,
|
|
91
|
+
"updated": 1703787612,
|
|
92
|
+
"is_email_confirmed": true,
|
|
93
|
+
"has_2fa": false,
|
|
94
|
+
"who_can_share_contact_card": "EVERYONE"
|
|
95
|
+
},
|
|
96
|
+
"message": {
|
|
97
|
+
"ok": true,
|
|
98
|
+
"messages": [
|
|
99
|
+
{
|
|
100
|
+
"user": "US676PZLY",
|
|
101
|
+
"type": "message",
|
|
102
|
+
"ts": "1716405857.659549",
|
|
103
|
+
"client_msg_id": "fd68d844-687e-41bf-8475-4215bef572c7",
|
|
104
|
+
"text": "hello",
|
|
105
|
+
"team": "TS8319547",
|
|
106
|
+
"blocks": [
|
|
107
|
+
{
|
|
108
|
+
"type": "rich_text",
|
|
109
|
+
"block_id": "ZL1yL",
|
|
110
|
+
"elements": [
|
|
111
|
+
{
|
|
112
|
+
"type": "rich_text_section",
|
|
113
|
+
"elements": [
|
|
114
|
+
{
|
|
115
|
+
"type": "text",
|
|
116
|
+
"text": "hello"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"reactions": [
|
|
124
|
+
{
|
|
125
|
+
"name": "squirrel",
|
|
126
|
+
"users": [
|
|
127
|
+
"US676PZLY"
|
|
128
|
+
],
|
|
129
|
+
"count": 1
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"has_more": false,
|
|
135
|
+
"response_metadata": {
|
|
136
|
+
"scopes": [
|
|
137
|
+
"identify",
|
|
138
|
+
"commands",
|
|
139
|
+
"channels:history",
|
|
140
|
+
"groups:history",
|
|
141
|
+
"im:history",
|
|
142
|
+
"mpim:history",
|
|
143
|
+
"channels:read",
|
|
144
|
+
"emoji:read",
|
|
145
|
+
"files:read",
|
|
146
|
+
"groups:read",
|
|
147
|
+
"im:read",
|
|
148
|
+
"mpim:read",
|
|
149
|
+
"reactions:read",
|
|
150
|
+
"reminders:read",
|
|
151
|
+
"search:read",
|
|
152
|
+
"stars:read",
|
|
153
|
+
"team:read",
|
|
154
|
+
"users:read",
|
|
155
|
+
"users:read.email",
|
|
156
|
+
"pins:read",
|
|
157
|
+
"usergroups:read",
|
|
158
|
+
"dnd:read",
|
|
159
|
+
"users.profile:read",
|
|
160
|
+
"channels:write",
|
|
161
|
+
"chat:write:user",
|
|
162
|
+
"chat:write:bot",
|
|
163
|
+
"files:write:user",
|
|
164
|
+
"groups:write",
|
|
165
|
+
"im:write",
|
|
166
|
+
"mpim:write",
|
|
167
|
+
"reactions:write",
|
|
168
|
+
"reminders:write",
|
|
169
|
+
"stars:write",
|
|
170
|
+
"users:write",
|
|
171
|
+
"pins:write",
|
|
172
|
+
"usergroups:write",
|
|
173
|
+
"dnd:write",
|
|
174
|
+
"users.profile:write",
|
|
175
|
+
"links:read",
|
|
176
|
+
"links:write",
|
|
177
|
+
"remote_files:share",
|
|
178
|
+
"remote_files:read",
|
|
179
|
+
"bookmarks:write",
|
|
180
|
+
"calls:write",
|
|
181
|
+
"calls:read"
|
|
182
|
+
],
|
|
183
|
+
"acceptedScopes": [
|
|
184
|
+
"channels:history",
|
|
185
|
+
"groups:history",
|
|
186
|
+
"mpim:history",
|
|
187
|
+
"im:history",
|
|
188
|
+
"read"
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"pipedream_msg_id": "pd_1716406186371_xezly8lgzn"
|
|
193
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import common from "../common/base.mjs";
|
|
2
|
+
import sampleEmit from "./test-event.mjs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
...common,
|
|
6
|
+
key: "slack_v2-new-saved-message",
|
|
7
|
+
name: "New Saved Message (Instant)",
|
|
8
|
+
version: "0.0.7",
|
|
9
|
+
description: "Emit new event when a message is saved. Note: The endpoint is marked as deprecated, and Slack might shut this off at some point down the line.",
|
|
10
|
+
type: "source",
|
|
11
|
+
dedupe: "unique",
|
|
12
|
+
props: {
|
|
13
|
+
...common.props,
|
|
14
|
+
// eslint-disable-next-line pipedream/props-description,pipedream/props-label
|
|
15
|
+
slackApphook: {
|
|
16
|
+
type: "$.interface.apphook",
|
|
17
|
+
appProp: "slack",
|
|
18
|
+
async eventNames() {
|
|
19
|
+
return [
|
|
20
|
+
"star_added",
|
|
21
|
+
];
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
...common.methods,
|
|
27
|
+
getSummary() {
|
|
28
|
+
return "New saved message";
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
sampleEmit,
|
|
32
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"type": "star_added",
|
|
3
|
+
"user": "US676PZLY",
|
|
4
|
+
"item": {
|
|
5
|
+
"type": "message",
|
|
6
|
+
"channel": "C055ECVUMLN",
|
|
7
|
+
"message": {
|
|
8
|
+
"user": "US676PZLY",
|
|
9
|
+
"type": "message",
|
|
10
|
+
"ts": "1718379912.272779",
|
|
11
|
+
"client_msg_id": "def19b3b-4283-47bd-a2da-f32b35c0329c",
|
|
12
|
+
"text": "hello",
|
|
13
|
+
"team": "TS8319547",
|
|
14
|
+
"blocks": [
|
|
15
|
+
{
|
|
16
|
+
"type": "rich_text",
|
|
17
|
+
"block_id": "ZL1yL",
|
|
18
|
+
"elements": [
|
|
19
|
+
{
|
|
20
|
+
"type": "rich_text_section",
|
|
21
|
+
"elements": [
|
|
22
|
+
{
|
|
23
|
+
"type": "text",
|
|
24
|
+
"text": "hello"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"permalink": "https://michellestest-j1q3506.slack.com/archives/C055ECVUMLN/p1718379912272779"
|
|
32
|
+
},
|
|
33
|
+
"date_create": 1718385156
|
|
34
|
+
},
|
|
35
|
+
"event_ts": "1718385156.694322",
|
|
36
|
+
"pipedream_msg_id": "pd_1718385158733_tl8yx25evl"
|
|
37
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import common from "../common/base.mjs";
|
|
2
|
+
import sampleEmit from "./test-event.mjs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
...common,
|
|
6
|
+
key: "slack_v2-new-user-added",
|
|
7
|
+
name: "New User Added (Instant)",
|
|
8
|
+
version: "0.0.5",
|
|
9
|
+
description: "Emit new event when a new member joins a workspace.",
|
|
10
|
+
type: "source",
|
|
11
|
+
dedupe: "unique",
|
|
12
|
+
props: {
|
|
13
|
+
...common.props,
|
|
14
|
+
// eslint-disable-next-line pipedream/props-description,pipedream/props-label
|
|
15
|
+
slackApphook: {
|
|
16
|
+
type: "$.interface.apphook",
|
|
17
|
+
appProp: "slack",
|
|
18
|
+
async eventNames() {
|
|
19
|
+
return [
|
|
20
|
+
"team_join",
|
|
21
|
+
];
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
...common.methods,
|
|
27
|
+
getSummary({ user: { name } }) {
|
|
28
|
+
return `New User: ${name}`;
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
sampleEmit,
|
|
32
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"type": "team_join",
|
|
3
|
+
"user": {
|
|
4
|
+
"id": "U080GULP8SD",
|
|
5
|
+
"team_id": "TS8319547",
|
|
6
|
+
"name": "",
|
|
7
|
+
"deleted": false,
|
|
8
|
+
"color": "9b3b45",
|
|
9
|
+
"real_name": "",
|
|
10
|
+
"tz": "America/New_York",
|
|
11
|
+
"tz_label": "Eastern Standard Time",
|
|
12
|
+
"tz_offset": -18000,
|
|
13
|
+
"profile": {
|
|
14
|
+
"title": "",
|
|
15
|
+
"phone": "",
|
|
16
|
+
"skype": "",
|
|
17
|
+
"real_name": "",
|
|
18
|
+
"real_name_normalized": "",
|
|
19
|
+
"display_name": "",
|
|
20
|
+
"display_name_normalized": "",
|
|
21
|
+
"fields": {},
|
|
22
|
+
"status_text": "",
|
|
23
|
+
"status_emoji": "",
|
|
24
|
+
"status_emoji_display_info": [],
|
|
25
|
+
"status_expiration": 0,
|
|
26
|
+
"avatar_hash": "g96b6e8b38c2",
|
|
27
|
+
"email": "",
|
|
28
|
+
"first_name": "",
|
|
29
|
+
"last_name": "",
|
|
30
|
+
"status_text_canonical": "",
|
|
31
|
+
"team": "TS8319547"
|
|
32
|
+
},
|
|
33
|
+
"is_admin": false,
|
|
34
|
+
"is_owner": false,
|
|
35
|
+
"is_primary_owner": false,
|
|
36
|
+
"is_restricted": false,
|
|
37
|
+
"is_ultra_restricted": false,
|
|
38
|
+
"is_bot": false,
|
|
39
|
+
"is_app_user": false,
|
|
40
|
+
"updated": 1731094476,
|
|
41
|
+
"is_email_confirmed": true,
|
|
42
|
+
"who_can_share_contact_card": "EVERYONE",
|
|
43
|
+
"presence": "away"
|
|
44
|
+
},
|
|
45
|
+
"cache_ts": 1731094476,
|
|
46
|
+
"event_ts": "1731094477.001400",
|
|
47
|
+
"pipedream_msg_id": "pd_1731094479305_v1ic236by8"
|
|
48
|
+
}
|