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 two simple command line examples that allow you to do this. One is written in Java and another is written in Javascript (using Node.js). Both code examples are published in our public Github repository.
The code requires two accounts:
- A 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)
Instructions for Java
Once you download and extract the zip file, everything you need should be in the "/Code-Examples/Synchronize Dropzone with Zendesk Agent List/Java Example" 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.
1. Update ZendeskSyncDropzone.java with credentials for the Zendesk and SendSafely Users
java -cp lib/*:bin/ ZendeskSyncDropzone
Once you download and extract the zip file, everything you need should be in the "/Code-Examples/Synchronize Dropzone with Zendesk Agent List/Javascript Example (Node)" folder. In order to run the script, you will need to have Node.js installed. Here are instructions on how to install node and run the script:
1. Visit https://nodejs.org/en/ and install the most recent version of Node.js.
2. You will need to update a few variables at the top of the script. The following lines will need to be edited:
var zdHost = "https://company_name.zendesk.com";
var ssApiKey = "PUT_YOUR_SENDSAFELY_API_KEY_HERE";
var ssApiSecret = "PUT_YOUR_SENDSAFELY_API_SECRET_HERE";
var zdUsername = "PUT_YOUR_ZENDESK_USERNAME_HERE";
var zdPassword = "PUT_YOUR_ZENDESK_PASSWORD_HERE";
3. Save the edited script and open a command line window. Navigate to the folder where you downloaded the script and run the following commands to install three required node modules (this command must be run from the same folder where the script is stored):
npm install @sendsafely/sendsafely
npm install window
npm install jquery
npm install sjcl
4. Next, run the script using the following command:
node ZendeskSyncDropzone.js
Comments
0 comments
Please sign in to leave a comment.