I’m having trouble with a Zap that sends messages to a private Slack channel. The Zap is triggered by our CRM when there’s a customer issue. It’s supposed to tag the right consultant in the message.
The problem is that sometimes the Zap tries to mention consultants who aren’t in the channel. This causes issues in our Slack group.
Is there a way to check if a user is in the channel before the Zap tries to mention them? Maybe we could use a filter or code step to look up channel members?
I’m looking for any solution that stops the Zap from mentioning people who aren’t in the channel. Thanks for your help!
You could approach this issue by implementing a fallback mechanism in your Zap. Instead of directly mentioning consultants, consider creating a lookup table or database that maps consultants to their Slack IDs. Before sending the message, check if the consultant’s ID exists in the channel member list. If not, you could either skip the mention or use a generic tag like ‘@here’ instead. This method requires some initial setup but provides a robust solution that won’t break when team members change. It also allows for easy updates when new consultants join or leave the channel.
hey livbrown, i’ve run into this before. one workaround is to use a Code step to fetch the channel members first. then you can check if the consultant is in that list before mentioning them. it’s a bit technical but works well. lmk if you need help setting it up!
I’ve dealt with this exact issue in my own Zaps. What worked for me was creating a multi-step Zap that first pulls the channel member list using Slack’s API, then compares the consultant’s username against that list. If there’s a match, the Zap proceeds with the mention. If not, it either skips the mention entirely or uses a fallback like ‘@here’.
The trickiest part was setting up the API call, but once that was done, it ran smoothly. You’ll need to use a Code step or a tool like APISpreadsheets to handle the API response and comparison.
This approach has saved us from a lot of notification errors and kept our Slack channels much cleaner. It takes some initial setup time, but it’s worth it for the long-term reliability.