How do I set up a two-way sync between Slack messages and Zendesk tickets using Zapier?
We’re looking to create a workflow where customer messages from a dedicated Slack channel are captured as tickets in Zendesk. Subsequently, when our agents respond in Zendesk, the response should update in the same Slack thread. If a customer replies in the Slack thread, that should also update the Zendesk ticket.
1st section is pretty easy with New message posted to channel in slack and create a ticket in zendesk but we cannot update the same ticket if we receive any message from slack. Any suggestions?
Page 1 / 1
Hi @Sebnem, welcome to the Community!
To have the Zap either create a new ticket or update and existing one you’ll need to make a few changes so that the actions for the Zap are as follows:
Trigger: New Message Posted to Channel (Slack) - runs whenever a new message is posted to a specific channel.
Action: Find Ticket(s) (Zendesk) - searches for the related ticket using information provided in the Slack message. Also has the ability to create a new ticket if an existing one isn’t found - Search for existing data in Zaps
Action: Only Continue if... (Filter by Zapier) - set to only continue if the _zap_search_was_found_status field from the previous action was true. Which would indicate that an existing ticket was found, so the Zap would only proceed to the next action if an existing ticket is found - Add conditions to Zaps with filters
Action: Update Ticket (Zendesk) - in the Ticket field you’d need to choose the custom value option then select the ID field for the ticket from the previous Zendesk action. You can learn more about using custom values here - Add custom values to dropdown menu fields in Zaps
That should ensure that the Zap searches for an existing ticket, creates one if it can’t find one. And if it does find one, it updates it.
Hope that helps to get you pointed in the right direction. If I’ve misunderstood or if you run into any trouble on setting that up at all just let me know!
Hi @SamB,
Thank you for the message. I followed your instructions and some points are not clear from our end. Because we try to update both ways. Perhaps I can breakdown step by step.
Step 1: If there is a new message in slack channel x, create a new ticket in Zendesk
Step 2: If there is any reply in the existing Zendesk ticket , update the slack channel x as a Threads
Step 3: If there is new Thread in slack channel x, update the ticket in Zendesk
Thanks in advance!
Hi @SamB ,
We have tried the workflow you recommended several times and it has not worked. The "Action: Only Continue if..." step does not work since "_zap_search_was_found_status" does not appear, but rather "Zap data was found" appears.
Ideally we want to be able to get the Slack messages and those from the thread of that same message in a Zendesk ticket. We also want to be able to respond within the Zendesk ticket and have the slack message thread updated.
Do you know if that is possible?
*We have tried to do a debug the issue but we have not found anything that helps us solve the problem.
Apologies for missing your replies here previously, @Sebnem!
Ah, sorry about the mix up there it looks like that _zap_search_was_found_status field will be named slightly differently depending on whether the Create Zendesk Ticket if it doesn’t exist yet? option is enabled or not. Either way, selecting that Zap data was found field in the filter would work in the same way.
For the different steps of the overall workflow I’d suggest splitting them into separate Zaps like so:
Zap 1: If there is a new message in slack channel x, create a new ticket in Zendesk
Trigger: New Message Posted to Channel (Slack) - runs whenever a new message is posted to a specific channel.
Action: Find Ticket(s) (Zendesk) - searches for the related ticket using information provided in the Slack message and creates one if not found.
Zap 2: If there is any reply in the existing Zendesk ticket , update the slack channel x as a Threads
Trigger: Updated Ticket (Zendesk) - runs whenever a ticket is updated with a new reply.
Action: Find Message (Slack) - searches for the related Slack message using information provided in the Zendesk ticket.
Action: Send Channel Message (Slack) - Adds a threaded reply to the Slack message that was found by the previous action.
Zap 3: If there is new Thread in slack channel x, update the ticket in Zendesk
Trigger: New Message Posted to Channel (Slack) - runs whenever a new message is posted to a specific channel.
Action: Only Continue if... (Filter by Zapier) - set to only continue if the Thread TS field from the previous action was Exists - this would indicate that the message was posted in a thread.
Action: Find Ticket(s) (Zendesk) - searches for the related ticket using information provided in the Slack message.
Action: Update Ticket (Zendesk) - updates the ticket found by the previous action.
There are some caveats to the above:
You could be in danger of creating an infinite Zap loop so you may need to add a filter condition to identify whether the message triggering the Zap should or shouldn’t be allowed to continue. Otherwise when Zap 2 posts a message that might trigger Zap 3, which then triggers Zap 2 and so on. For example a certain phrase could always be included in the messages posted by Zap 2 so that the filter on Zap 3 can check that phrase isn’t present.
Depending on what information will be available from the triggers on each Zap the search steps might not be able to find a match. In which case you may need to add a record of each message and it’s corresponding Zendesk ticket to a database or spreadsheet app. Zapier Tables might be a good option to use for this as it’s built to work with automations in mind. Then in Zaps 2 and 3 you’d search the Zapier Tables table (using a Find or Create Record action) to get the corresponding Slack thread ID or Zendesk ticket ID that you’d need for the Send Channel Message or Update Ticket actions.
Let me know if you run into any issues on that or have any questions, happy to help further!