Exporting Macros to CSV Script
Last Updated -
Here, we'll show you how to connect to a Desk.com account and export all macros to a comma-separated value (CSV) file. This is a great way to audit macros for organizational and clean up purposes.
Before proceeding with this article, it should be noted that you would need some programming proficiency and experience so a developer may be required.
This script is written in Ruby and requires at least version 2.3.0, or above. To check which version of Ruby you have installed, simply run
ruby -v in a terminal.
Note: Using RVM to manage your Ruby installations is highly recommended.
Download the sample code at: https://desk-wow.s3.amazonaws.com/services/Macro-to-CSV.zip
Navigate to the folder (for example using
cd ~/Desktop/Macro-to-CSVin a terminal and run these commands:
gem install bundler
cp .env.example .env
Edit .env to include your credentials.
To save the file, use Control X, and then hit Y for Yes.
Now run the following:
You will see a progress bar while this is running.
A CSV file will be created with the format: domain_desk_com-macros-YY_MM_DD.csv in the directory of