Portfolio Project

Automated Zendesk → Slack Daily Reporting

A Google Apps Script automation that pulls real-time ticket data from Zendesk API, processes daily metrics, and delivers formatted reports to Slack — eliminating manual reporting and boosting team visibility.

JavaScript Google Apps Script Zendesk REST API Slack Webhooks JSON Processing
🎫
Zendesk API
⚙️
Apps Script
💬
Slack

Live Dashboard

Click the buttons to simulate automated reports

Open Tickets 🔴
Pending Tickets 🟡
Solved Today 🟢
Total in Queue 📊

🏷️ Top Tags Today

Waiting...
📋

Run Evening Report to see today's top issue tags

💬 Slack Message Preview

No messages

Click a report button to preview the Slack message

📄 Ticket Details (Mock Data)

0 tickets
ID Subject Status Priority Tags Updated

⚡ How It Works

Key implementation highlights from the Google Apps Script

1. Fetch Tickets from Zendesk API
function getTicketsFromView(viewId) {
  const url = `https://${SUBDOMAIN}.zendesk.com
    /api/v2/views/${viewId}/tickets.json`;

  const response = UrlFetchApp.fetch(url, {
    headers: {
      Authorization: 'Basic ' + 
        Utilities.base64Encode(EMAIL + ':' + TOKEN)
    }
  });

  return JSON.parse(response.getContentText())
    .tickets || [];
}
2. Process & Aggregate Tag Data
// Count tag frequency across all tickets
const tagCounter = {};
tickets.forEach(ticket => {
  (ticket.tags || []).forEach(tag => {
    tagCounter[tag] = (tagCounter[tag] || 0) + 1;
  });
});

// Extract Top 3 most common tags
const topTags = Object.entries(tagCounter)
  .sort((a, b) => b[1] - a[1])
  .slice(0, 3);
3. Send Formatted Report to Slack
function sendToSlack(text) {
  UrlFetchApp.fetch(SLACK_WEBHOOK_URL, {
    method: 'post',
    contentType: 'application/json',
    payload: JSON.stringify({ text })
  });
}

// Example message:
// 🌅 Laporan Pagi — 18 April 2026
// Total tiket OPEN: 12
// Total tiket PENDING: 5

✨ Key Features

Scheduled Automation

Time-driven triggers run reports automatically every weekday — morning & evening, with weekend exclusion logic.

🔗

API Integration

Seamless integration between Zendesk REST API (Basic Auth + Base64) and Slack Incoming Webhooks.

📊

Data Aggregation

Processes hundreds of tickets with pagination handling, calculates status counts, and ranks issue tags by frequency.

🛡️

Secure & Lightweight

Runs entirely on Google's infrastructure — zero hosting cost, no server maintenance, credentials stored server-side.