Bulk Message & Auto-Solve for Zendesk
A Python automation tool that sends templated messages to hundreds of customers via Sunshine Conversations API and auto-solves their tickets, handling mass incidents in minutes instead of hours.
Live Simulation
Click to simulate the bulk messaging process with mock data
๐ฅ๏ธ Console Output
Idle๐ Tickets in View (Mock Data)
0 tickets| ID | Subject | Requester | Status | Tags | Result |
|---|
โก How It Works
Key implementation highlights from the Python script
def list_view_tickets_pages(view_id):
url = f"{ZD_BASE}/views/{view_id}/tickets.json"
while url:
r = req_with_retry("GET", url, auth=ZD_AUTH)
data = r.json()
yield data.get("tickets", [])
url = data.get("next_page")
def get_conversation_id_for_ticket(ticket):
# Try direct from ticket metadata
via = ticket.get("via") or {}
conv = via.get("source", {}).get("to", {})
.get("conversation_id")
if conv:
return conv.strip()
# Fallback: user identity โ conversation
messaging_id = get_messaging_identity(
ticket["requester_id"]
)
return get_default_conversation(messaging_id)
def send_text_message(conversation_id, text):
url = f"{SC_BASE}/conversations/"
f"{conversation_id}/messages"
payload = {
"author": {"type": "business"},
"content": {"type": "text", "text": text}
}
req_with_retry("POST", url, auth=SC_AUTH,
json=payload)
def solve_and_tag_ticket(ticket_id, tags):
payload = {"ticket": {
"status": "solved", "tags": tags
}}
req_with_retry("PUT", url, auth=ZD_AUTH,
json=payload)
โจ Key Features
View-Based Targeting
Processes only tickets from a specific Zendesk View. Precise targeting without affecting other queues.
Retry with Backoff
Handles rate limits (429) and server errors (5xx) with exponential backoff, up to 5 attempts per request.
Idempotent Processing
Tags processed tickets to prevent duplicate sends. Safe to re-run without sending messages twice.
Progress Reporting
Real-time console output with per-ticket status and final summary of sent, skipped, and failed counts.
๐ WhatsApp Bulk Capability Comparison
How this tool compares to other platforms for bulk WhatsApp replies within the 24-hour service window.
No Meta Template Approval Required (Inside 24h)
This tool uses Sunshine Conversations API to send structured messages (text, cards, carousels)
within the 24-hour session window, without submitting templates to Meta for approval.
It routes messages to the specific conversation_id tied to each ticket, ensuring replies land in the correct thread.
๐ Platform Comparison
24h window rules| Platform / Approach | Bulk WhatsApp Inside 24h | Outside 24h | Best Fit |
|---|---|---|---|
| This Tool (Sunshine API) | โ Yes, ticket reply | โ ๏ธ Template or skip | Mass incident replies from Zendesk Views |
| Front | โ Bulk reply | โ ๏ธ Template rule | Shared inbox teams with native bulk |
| Kommo / DoubleTick / Manychat | โ Active sessions | โ ๏ธ Template required | WhatsApp-first broadcast to contacts |
| Zoho Desk | โ Not main flow | โ ๏ธ Template | Mass template messages to tickets |
| Qontak / WATI / respond.io | โ ๏ธ Campaign-specific | โ ๏ธ Template | Approved-template blast workflows |
| Freshdesk / Gorgias | โ ๏ธ Possible as reply | โ ๏ธ Template rule | Support tickets and agent macros |
conversation_id linked to the ticket. It first checks ticket metadata, then falls back to the user's default conversation. This is conversation-based delivery: the message reaches the same thread the customer used, not a generic channel broadcast.
๐ก๏ธ Implementation Guardrails
Check the Window
Do not assume every ticket is eligible. Verify the last inbound customer message timestamp is within 24 hours before sending.
Reply โ Broadcast
This is bulk reply to existing conversations, not cold outbound broadcast. The customer initiated contact first.
Idempotency via Tags
Tag processed tickets so reruns skip previously handled tickets and avoid duplicate customer messages.
๐ Adaptable to Other Platforms
The same "reply to active conversation via API" pattern can be replicated on other helpdesk platforms with their respective APIs.
Almost identical pattern. Reply as admin to existing conversations. Free-form text, no template needed.
Send messages to existing Freshchat conversations. Requires mapping Freshdesk tickets to Freshchat conversation IDs.
New Conversations API v3 supports sending messages to existing threads. Also supports custom channels.