Skip to main content

Hello and thanks for viewing this post! 

I’m working on a Zap that automates a process for a colleague of mine. It would trigger off of a colleagues copy + pasted notes into a specified slack channel. From here, we would check if this is a channel message or threaded message. If it’s a channel message, I'd like the bot to reply in a thread for the message (to limit noise within the slack channel). If it’s a threaded message, I’d still like the bot to obviously reply within the same thread, but I’d want the bot to stay informed in the discourse that’s been shared and maintain that conversation history so that it can continue to provide accurate and well-informed responses. I’ve tried to solve this by finding the message, and then mapping the Ts variable for the slack message, but whenever I try and access the thread option in “Send Slack Channel Message,” there is no option provided. Soooo with all that being said, I’m kind of lost when it comes to replying within a thread and maintaining conversation history, especially with the thread option not being available to me…

Please let me know if you need anymore further clarification on the pipeline for the Zap. I’ve attached some (hopefully) helpful screenshots to pinpoint what’s going wrong here :( 

 

Hi @blazersfan77 

Click the vertical ...] button at the right and change it to the other option. (Custom)

Used to set a dynamic variable from a previous Zap step.

 

 


Thank you so much! That seems like it was helpful. When I publish the Zap, it gave me an error on the formatter though. Do you know what’s happening here considering the information shared earlier? 

 


@blazersfan77 

The encountered error message provides guidance that one of the mapped variables likely had “no data” because it was blank/empty/missing/null so the Formatter formula could not be evaluated.

In your Zap Run, check the DATA IN/OUT for each step to help you trace the data flow and troubleshoot: https://zapier.com/app/history/

 

 


The problem seems to be happening here, I assume? Everytime I try and test this search query, it results in “

Failed to find a message in Slack

Error from halted execution: Nothing could be found for the search.

Click on the Troubleshoot tab below or learn more in our help center.”

When I check the formatter, the DATA IN/DATA OUT looks correct? 
 

 


 


@Troy Tessalone Any thoughts on how I’m incorrectly mapping the Thread TS? 


@blazersfan77

When you see {{PLACEHOLDER}} as part of the DATA IN for a Zap step in a Zap Run, that means the mapped variable was either invalid/blank/empty/missing/null.

For that Formatter step, the formula expects a value on both sides of the = in order to evaluate and return a result.

 


Totally understand! My question is how do I fix it considering the fields that I showed you? haha

I’m completely stumped.

 


In Formatter, when I test and use the formula, it always passes with the correct values on each side, but when I publish and run the Zap, it always has a problem with the mapping for the threaded timestamp. 


 


@blazersfan77 

You likely need to remove or move the Formatter step within a Path.

You may need another Path and possibly nested Paths to handle the logic for possible cases.

e.g. Path Filter to detect which of the 2 possible TS are available.

  • 1: TS only
  • 1: Thread TS
  • Both

 

 

 


That’s a great idea! How would you recommend I implement that within the structure I’ve shared? 

 


@blazersfan77 

Play around with it a bit to see if you can figure it out. (When in doubt, test it out.)

You may actually need 4 Paths.

  1. 1 path if only TS exists
  2. 1 path if only Thread TS exists
  3. 1 path if both TS exist (move the Formatter step within this path)
    1. 1 nested path if both TS exist AND evaluate in the Formatter step to TRUE
    2. 1 nested path if both TS exist AND evaluate in the Formatter step to FALSE

  1. Okay you were totally right - when in doubt, test it out haha because that totally worked! We’ve got channel message + thread message recognition. The only problem now with specifically thread message recognition is the inability for the assistant that we’re talking with to remember what our last query was - any thoughts? 

    Example:

    > What color is the sky?
    - The sky is blue.
    > Why is it blue?
    - *has no idea what object we’re referring to*

P.S You’re amazing Troy! Cannot express how much I appreciate the assistance! 


@blazersfan77 

In the ChatGPT step, use a Memory Key value that will be unique but consistent for the Slack Channel Message/Thread.


@Troy Tessalone 

So here’s image of my automation for reference:
 

With this pipeline in mind, I tried leveraging the “Ts” value for the conversation ID on both Conversations with Assistants across Channel/Thread Messages but that didn’t work. What are steps I can take to ensure uniqueness without compromising consistency? Should it be a static keyword? 

My reasoning was based on there only ever being one channel message and that being the parent message. From there, we can maintain memory from that point forward and reflect on that property as our memory ID since every subsequent message would be a thread message. 


@blazersfan77 

For us to have more context, post screenshots with how your ChatGPT Zap steps are configured.


Both Channel/Thread contain the same configuration within this page.


@blazersfan77 

Try using the Thread Ts since the Ts will change each time.

 


I tried configuring both lines to have the conversation ID mapped to the “thread ts” variable, but it’s still unable to remember what we talked about previously when asking it to “expand on one of the elements it spoke to earlier.” 

This is what I have as my current configuration ffor reference]: 
 

 


Update: I changed the configuration of the Conversation ID to the output from the formatter and that worked! It now remembers our conversation. Here’s screenshot for reference!

 

 


That’s awesome news @blazersfan77! 🎉

Thanks so much for following up here to share details of how you got the OpenAI Assistant to remember the past conversation, it’s much appreciated! 🧡 

Sounds like you might be all set with this now? If not, please do let us know and we’ll be happy to assist further. In the meantime, happy Zapping! ⚡️