Best answer

How do I send direct messages in slack based on the assignee of a ticket in zendesk?

  • 29 March 2021
  • 4 replies
  • 251 views

Userlevel 1

Hi there,

I’d like to set up a zap which sends a direct message to a user based on a ticket event and the assignee of that ticket in zendesk.

For this purpose I’m trying to use: Send Slack direct messages for new Zendesk tickets

I’ve then created a view which returns open tickets.

The bit I’m struggling with, is how to set the username notified to be variable upon who the ticket is assigned to in Zendesk.

In the custom fields it has zendesk assignee email, but when I test the zap I get a channel not found error.

I’ve tested the trigger and it picks up the ticket perfectly. So I’m pretty certain the issue is with going from the zendesk assignee’s email to a slack users DM.

Has anyone done this before, or know a way to set it up?

 

 

icon

Best answer by MarijnVerdult 29 March 2021, 14:42

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.

4 replies

Userlevel 4
Badge +3

@TCurry 

To send a direct message, it’s best to use the “Slack ID” of that person since the username can change. You can see the Slack ID below: U1K7SHA9J


To translate Assignee Email to Slack ID, I would advise using a Lookup Table:

 

Userlevel 1

Hi @MarijnVerdult thanks for the suggestion. I was hoping that as zendesk and slack hold the same email address for our agents that there would be a way to automatically link up the two based on that. Rather than the agents username which as you say can change.

 

The lookup table I think requires me to manually input all of our agents emails and their relevant slack ids which isn’t a sustainable solution for me as we have several hundred agents. Am I understanding this correctly, or is there a way to set up the translation from Assignee Email to Slack ID to be a bit more automatic, or is there a way this can be uploaded in bulk?

 

Thanks!

 

Userlevel 4
Badge +3

@TCurry - With so many agents a Lookup Table is indeed not the best way to go. Unfortunately there doesn’t seem to be the option to message based on email address directly.

 

I just found the Find User by Email in Slack search step. You should be able to use this to translate the email into a user id:

 

The Zap would then be:

  1. Trigger by Zendesk
  2. Find User by Email in Slack
  3. Private Message based on User ID

 

Userlevel 1

@MarijnVerdult what a find!! That works an absolute treat.

This unlocks a load of cool applications for us, really appreciate the help :raised_hands:

For anyone interested in how I set up the trigger to work when a tickets status changes as I don’t think there’s currently that option.

I created a view looking for tickets in status open, so when a tickets status changed to open it ended up in the view triggering the rest of the zap.