Zendesk - Synchronizing Dropzone Recipients with your Agent List


If you are using the SendSafely Dropzone with Zendesk and add or remove Zendesk agents on a frequent basis, you may want to consider using an automated process to synchronize your Dropzone with the Agent List from Zendesk. We've developed a simple command line JAR file that allows you to do just that, which you can download below. 

Once you extract the zip file, everything you need should be in the ZendeskSyncDropzone folder. The example app will pull all agents and admins from Zendesk and then run through all active Dropzone recipients and then add/remove recipients from SendSafely so that the Dropzone recipient list matches the list of Zendesk agents & admins. 

The code requires two accounts:
  • Zendesk login (may require admin rights to get the full list)
  • A SendSafely account (the account must own the Dropzone that you are trying to synchronize)
For each account, you'll need to generate an API Key for the Java code to use. 

Here are steps/commands on how to compile and run the code from a machine with Java installed:

1. Update ZendeskSyncDropzone.java with credentials for the Zendesk and SendSafely Users

2. Recompile the code
javac -d bin -cp lib/SendSafely.jar:lib/bcpg-jdk15on-151.jar:lib/bcprov-jdk15on-151.jar:lib/gson-2.3.jar:lib/zendesk-client.jar:lib/async-http-client-1.9.15.jar:lib/handy-uri-templates-1.1.7.jar:lib/jackson-annotations-2.1.4.jar:lib/jackson-core-2.1.4.jar:lib/jackson-databind-2.1.4.jar:lib/slf4j-api-1.7.2.jar:lib/slf4j-simple-1.7.2.jar src/ZendeskSyncDropzone.java

3. Run the app 
java -cp lib/*:bin/ ZendeskSyncDropzone
NOTE: There is also a "previewOnly" flag that is set to "true", meaning that the program will print what it would normally do without actually making the updates. You can use this to prevent any updates from occurring until you are comfortable that the program is working correctly.
Have more questions? Submit a request