Best answer

Add reply to existing slack messages, if found

  • 30 August 2022
  • 1 reply
  • 100 views

Userlevel 1

Hey Zapier community!

I feel like this is possible and I’m just missing something.

We have a Zap that sends leads to Slack. Each one of those messages contains an ID that is unique to the lead. 

What’s happening: a new Slack message is created each time something comes in for that lead.

What I’d like: when a lead already exists in Slack, to create a reply to that original message, making it into a thread instead.

I know it’s related to timestamps but I haven’t had the time to figure it out. Hoping someone here can shed some light.

Thanks!

icon

Best answer by nicksimard 30 August 2022, 03:02

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +11

Hey@ZapsAndApps!

That is possible indeed! 

Here’s the gist of how it would work (you could use multiple Zaps, or one Zap with multiple paths):

Zap/Path 1
Trigger: Whatever your app is
Slack: Find Message (by date ascending, you find the oldest message)
Filter/Path Rule: Only continue if it’s NOT found
Slack: Send Message (not replying to any existing message)

Zap/Path 2
Trigger: Whatever your app is
Slack: Find Message (by date ascending, you find the oldest message)
Filter/Path Rule: Only continue if it IS found
Slack: Send Message (replying to the existing message)

I think you’ve got a handle on everything else so I’ll focus on the part where the reply happens:

c0efb0396cd46b05ef3d3cd67481cda2.gif

In the GIF above you see the search, then the filter (only continue if a message is found), then under the Thread field you use the timestamp of the message you found.

Does that shed enough light onto it that you can continue from here? Let us know if you still have questions!