Recent searches
No recent searches

Gareth Elsby
Joined Apr 16, 2021
·
Last activity Oct 27, 2021
Following
0
Followers
0
Total activity
2
Votes
0
Subscription
1
ACTIVITY OVERVIEW
BADGES
ARTICLES
POSTS
COMMUNITY COMMENTS
ARTICLE COMMENTS
ACTIVITY OVERVIEW
Latest activity by Gareth Elsby
Gareth Elsby commented,
Hey Justin,
Great tool! I've taken a copy of this and I've been having a play around with it. I managed to create one to pull down organisations and support addresses. They work pretty good!
function onOpen(){
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menu = [
{name: "Configure", functionName: "zendeskConfigure"},
{name: "Get Agents", functionName: "getAgents"},
{name: "Get Problems", functionName: "getProblems"},
{name: "Get Organisations", functionName: "getOrganisations"},
{name: "Get Support Addresses", functionName: "getSupportAddresses"},
{name: "Get Triggers", functionName: "getTriggers"}
];
ss.addMenu("Zendesk", menu);
}
// Get all organisations
function getOrganisations() {
var resultId = 'organizations';
var sheet = 'Organizations';
var params = 'organizations.json';
var fields = [ "id", "name", "domain_names","organization_fields" ];
var result = getClient().request(params);
spreadsheetDBSave(result, resultId, sheet, fields);
}
// Get all Support addresses
function getSupportAddresses() {
var resultId = 'recipient_addresses';
var sheet = 'Support Addresses';
var params = 'recipient_addresses.json';
var fields = [ "id", "name", "email", "default", "forwarding_status" ];
var result = getClient().request(params);
spreadsheetDBSave(result, resultId, sheet, fields);
}
Could you think of a way to handle pagination on Organisations? I could only pull down the first 100 :(
Thanks!
View comment · Posted May 15, 2019 · Gareth Elsby
0
Followers
0
Votes
0
Comments