Best answer

Detect duplicate messages and send a message on Slack channel

  • 16 April 2020
  • 2 replies
  • 274 views

Userlevel 1

Hey everyone. I’m new to Zap. Hope to receive some pointers how to create a basic bot to keep an eye on Slack.

What I’m trying to achieve here is to have Zap constantly reading the channel and when it detects a duplicate message (spam), send out a message to warn the user to reduce spam and avoid cluttering. The flow for Zap I currently have in mind is something like:

1. When a new message is posted to channel in Slack
2. Do formatter by Zapier (I’m lost on this part)
3. Only continue if criteria is met - if similar message has been posted before
4. Send channel message in Slack

As you can see I’m stuck on step 2. Unsure how should I configure the filter to filter out the information I need and then act upon it. Appreciate any help I can get. Thanks!

icon

Best answer by nicksimard 17 April 2020, 21:52

Hi there and welcome to Zapier!

While this might be possible, it’s going to require that you keep track of all messages posted to that Slack channel and every time you trigger on a new message, you’ll have to check whether it’s been posted before. So you’d need some sort of database/spreadsheet (like Airtable, Google Sheets, etc). And honestly, I’m not sure how feasible that will be in terms of how many tasks it would use up.

So something like this maybe, assuming you used Airtable:

Trigger: Slack — New Message Posted to Channel
Action: Airtable — Find/Create Record (use the message text to see if it’s come through before)
Filter: Only continue if... Zap Data Found is true (meaning that we found a record, as opposed to creating a new one)
Action: Slack — Send Direct Message

I see that you also wrote in to our support team. If you’ve got questions about how to implement something like this, then it may be best to follow up with them (they’ll be sending you a message soon if they haven’t already).

View original

This topic has been closed for comments

2 replies

Userlevel 7
Badge +10

Hi there and welcome to Zapier!

While this might be possible, it’s going to require that you keep track of all messages posted to that Slack channel and every time you trigger on a new message, you’ll have to check whether it’s been posted before. So you’d need some sort of database/spreadsheet (like Airtable, Google Sheets, etc). And honestly, I’m not sure how feasible that will be in terms of how many tasks it would use up.

So something like this maybe, assuming you used Airtable:

Trigger: Slack — New Message Posted to Channel
Action: Airtable — Find/Create Record (use the message text to see if it’s come through before)
Filter: Only continue if... Zap Data Found is true (meaning that we found a record, as opposed to creating a new one)
Action: Slack — Send Direct Message

I see that you also wrote in to our support team. If you’ve got questions about how to implement something like this, then it may be best to follow up with them (they’ll be sending you a message soon if they haven’t already).

Userlevel 1

I figured it might not be quite feasible to pull it off using Zapier. Thanks for trying anyway!