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
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: