@pipedream/slack 0.4.30 → 0.4.32

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/README.md CHANGED
@@ -2,18 +2,16 @@
2
2
 
3
3
  The Pipedream Slack app enables you to build event-driven workflows that interact with the Slack API. When you authorize the Pipedream app's access to your workspace, you can use [Pipedream workflows](/workflows/) to perform common Slack [actions](#workflow-actions), or [write your own code](/code/) against the Slack API.
4
4
 
5
- The Pipedream Slack app is not a typical app. You don't interact with it directly as a bot, and it doesn't add custom functionality to your workspace out of the box. It just makes it easier to automate anything you'd typically use the Slack API for, using Pipedream workflows.
5
+ The Pipedream Slack app is not a typical app. You don't interact with it directly as a bot, and it doesn't add custom functionality to your workspace out of the box. It makes it easier to automate anything you'd typically use the Slack API for, using Pipedream workflows.
6
6
 
7
- Here are some examples of automations you can build with Pipedream on Slack:
8
-
9
- - Automate posting updates to your team channel
7
+ - Automate posting updates to your team channels
10
8
  - Create a bot to answer common questions
11
9
  - Integrate with your existing tools and services
12
- - Build a custom dashboard to track your team's progress
13
- - Create a bot to handle scheduling and meeting requests
14
10
  - And much more!
15
11
 
16
- ### Should I use the Slack or Slack Bot app on Pipedream?
12
+ # Getting Started
13
+
14
+ ## Should I use the Slack or Slack Bot app on Pipedream?
17
15
 
18
16
  The Slack app is the easiest and most convienent option to get started. It installs the official Pipedream bot into your Slack workspace with just a few clicks.
19
17
 
@@ -21,10 +19,6 @@ However, if you'd like to use your own bot registered with the [Slack API](https
21
19
 
22
20
  The Slack Bot requires a bot token to allow your Pipedream workflows to authenticate as your bot. The extra set up steps allow you to list your custom bot on the Slack Marketplace, or install the bot on other workspaces as your bot's name instead of as Pipedream.
23
21
 
24
- # Getting Started
25
-
26
- You can install the Pipedream Slack app in the [Accounts](https://pipedream.com/accounts) section of your account, or directly in a workflow
27
-
28
22
  ## Accounts
29
23
 
30
24
  1. Visit [https://pipedream.com/accounts](https://pipedream.com/accounts).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/slack",
3
- "version": "0.4.30",
3
+ "version": "0.4.32",
4
4
  "description": "Pipedream Slack Components",
5
5
  "main": "slack.app.mjs",
6
6
  "keywords": [
@@ -6,7 +6,7 @@ Slack messages can contain interactive elements like buttons, dropdowns, radio b
6
6
 
7
7
  Then this source will be triggered when you or another Slack user in your workspace clicks a button, selects an option or fills out a form.
8
8
 
9
- ![Example feed of interaction events coming from Slack]([screenshots/CleanShot_2022-11-10_at_10.19.152x.png](https://res.cloudinary.com/pipedreamin/image/upload/v1668443818/docs/components/CleanShot_2022-11-10_at_10.19.152x_eyiims.png))
9
+ ![Example feed of interaction events coming from Slack](https://res.cloudinary.com/pipedreamin/image/upload/v1668443818/docs/components/CleanShot_2022-11-10_at_10.19.152x_eyiims.png)
10
10
 
11
11
  With this trigger, you can build workflows that perform some work with other APIs or services, and then reply back to the original message.
12
12
 
@@ -16,7 +16,7 @@ With this trigger, you can build workflows that perform some work with other API
16
16
 
17
17
  What this short video to learn how to use this in a workflow, or follow the guide below.
18
18
 
19
- First, if you haven’t already - send yourself a message containing one or more interactive elements. Use the ******************Sending the message with an interactive element****************** guide below to send a messsage containing a button.
19
+ First, if you haven’t already - send yourself a message containing one or more interactive elements. Use the ******************Sending the message with an interactive element****************** guide below to send a message containing a button.
20
20
 
21
21
  If you have already sent a message containing an element, skip to **********************************************Configuring the source.**********************************************
22
22
 
@@ -54,7 +54,7 @@ Your ******************Slack - Send Message Using Block Kit****************** sh
54
54
 
55
55
  ## Configuring the source
56
56
 
57
- By default, this source will listen to ******all****** interactive events from your Slack workspace that your connected Slack account has authorization to view.
57
+ By default, this source will listen to ******all****** interactive events from your Slack workspace that your connected Slack account has authorization to view. Please note that only messages created via [Slack - Send Block Kit Message](https://pipedream.com/apps/slack/actions/send-block-kit-message) Action, or via API call from the Pipedream app will emit an interaction event with this trigger. Block kit messages sent directly via the Slack's block kit builder will not trigger an interaction event.
58
58
 
59
59
  You can filter these events by selecting a specific **************channel************** and/or a specific **********action_id.**********
60
60
 
@@ -72,12 +72,14 @@ For example, in the section above using the Block Kit to create a message, we de
72
72
 
73
73
  If you pass `button_click` as a required `action_id` to this source, then only interactivity events with the `action_id` of `"button_click"` will trigger this source.
74
74
 
75
- # Troubleshooting
75
+ ## Troubleshooting
76
76
 
77
- ## I’m clicking buttons, but no events are being received
77
+ ### I’m clicking buttons, but no events are being received
78
78
 
79
79
  Follow these steps to make sure your source is configured correctly:
80
80
 
81
81
  1. Make sure that your `action_id` or ****************channels**************** filters apply to that message, remove the filters to make sure that’s not the case.
82
82
 
83
83
  1. Make sure that the message comes from the same Slack account that this source is configured with.
84
+
85
+ 1. Make sure that the message was sent via Pipedream action (e.g. [Slack - Send Block Kit Message](https://pipedream.com/apps/slack/actions/send-block-kit-message) Action) or via API call from the Pipedream app.
@@ -2,18 +2,23 @@ import common from "../common/base.mjs";
2
2
 
3
3
  export default {
4
4
  name: "New Interaction Events",
5
- version: "0.0.9",
5
+ version: "0.0.10",
6
6
  key: "slack-new-interaction-event-received",
7
7
  description:
8
8
  "Emit new events on new Slack [interactivity events](https://api.slack.com/interactivity) sourced from [Block Kit interactive elements](https://api.slack.com/interactivity/components), [Slash commands](https://api.slack.com/interactivity/slash-commands), or [Shortcuts](https://api.slack.com/interactivity/shortcuts).",
9
9
  type: "source",
10
10
  props: {
11
11
  ...common.props,
12
+ alert: {
13
+ type: "alert",
14
+ alertType: "info",
15
+ content: "Please note that only messages created via Pipedream's [Send Block Kit Message](https://pipedream.com/apps/slack/actions/send-block-kit-message) Action, or via API call from the Pipedream app will emit an interaction event with this trigger. \n\nBlock kit messages sent directly via the Slack's block kit builder will not trigger an interaction event. \n\nSee the [documentation](https://pipedream.com/apps/slack/triggers/new-interaction-event-received) for more details.",
16
+ },
12
17
  action_ids: {
13
18
  type: "string[]",
14
19
  label: "Action IDs",
15
20
  description:
16
- "Filter interaction events by specific `action_id`'s to subscribe for new interaction events. If none selected, all `action_ids` will emit new events.",
21
+ "Filter interaction events by specific `action_id`'s to subscribe for new interaction events. If none are specified, all `action_ids` created via Pipedream will emit new events.",
17
22
  optional: true,
18
23
  default: [],
19
24
  },
@@ -6,7 +6,7 @@ export default {
6
6
  ...common,
7
7
  key: "slack-new-message-in-channels",
8
8
  name: "New Message In Channels (Instant)",
9
- version: "1.0.13",
9
+ version: "1.0.14",
10
10
  description: "Emit new event when a new message is posted to one or more channels",
11
11
  type: "source",
12
12
  dedupe: "unique",
@@ -44,6 +44,12 @@ export default {
44
44
  "ignoreBot",
45
45
  ],
46
46
  },
47
+ ignoreThreads: {
48
+ type: "boolean",
49
+ label: "Ignore replies in threads",
50
+ description: "Ignore replies to messages in threads",
51
+ optional: true,
52
+ },
47
53
  },
48
54
  methods: {
49
55
  ...common.methods,
@@ -66,6 +72,13 @@ export default {
66
72
  if ((this.ignoreBot) && (event.subtype == "bot_message" || event.bot_id)) {
67
73
  return;
68
74
  }
75
+ console.log(event.s);
76
+ // There is no thread message type only the thread_ts field
77
+ // indicates if the message is part of a thread in the event.
78
+ if (this.ignoreThreads && event.thread_ts) {
79
+ console.log("Ignoring reply in thread");
80
+ return;
81
+ }
69
82
  if (this.resolveNames) {
70
83
  if (event.user) {
71
84
  event.user_id = event.user;