good first issueintegrationnew-featurenew-integration
Repository metrics
- Stars
- (1,930 stars)
- PR merge metrics
- (Avg merge 3h 2m) (10 merged PRs in 30d)
Description
Description
Add Zendesk integration to sync support tickets, users, organizations, and customer interactions into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/hubspot/- Similar CRM/customer management systemintegrations/linear/- For issue tracking patternsintegrations/github/- For OAuth and webhooks reference
Required Files Structure
integrations/zendesk/
├── src/
│ ├── index.ts # Main entry, OAuth spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Zendesk API utilities
│ ├── account-create.ts # OAuth setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Zendesk API Integration
OAuth Setup
- Use OAuth 2.0 Authorization Code flow
- Authorization URL:
https://{subdomain}.zendesk.com/oauth/authorizations/new - Token URL:
https://{subdomain}.zendesk.com/oauth/tokens - Required scopes:
read- Access to GET endpoints, includes sideloading related resourceswrite- Access to POST, PUT, DELETE endpoints for creating, updating, deleting resourcesimpersonate- (optional) Allows admin to make requests on behalf of end users
- OAuth clients are registered in Admin Center > Apps and integrations > APIs > OAuth clients
Key Endpoints
Base URL: https://{subdomain}.zendesk.com/api/v2
Tickets
GET /tickets- List all ticketsGET /tickets/{id}- Get a specific ticketPOST /tickets- Create a ticketPUT /tickets/{id}- Update a ticketDELETE /tickets/{id}- Delete a ticketGET /tickets/{id}/comments- List ticket commentsGET /tickets/{id}/audits- List ticket audits (change history)GET /tickets/{id}/tags- List ticket tags
Users
GET /users- List usersGET /users/{id}- Get a userGET /users/me- Get authenticated userGET /users/search?query={query}- Search users
Organizations
GET /organizations- List organizationsGET /organizations/{id}- Get an organizationGET /organizations/{id}/tickets- List tickets for an organization
Search
GET /search?query={query}- Unified search across tickets, users, and organizations
Webhooks
POST /webhooks- Create a webhookGET /webhooks- List webhooksPUT /webhooks/{id}- Update a webhookDELETE /webhooks/{id}- Delete a webhook
Other
GET /ticket_fields- List ticket fieldsGET /ticket_forms- List ticket formsGET /groups- List agent groupsGET /satisfaction_ratings- List satisfaction ratingsGET /tags- List tags
Events to Track
-
Tickets
- Ticket created
- Ticket updated (status change, priority change, assignee change)
- Ticket solved / closed
- Ticket comment added (public and internal notes)
- Ticket rated (satisfaction survey)
-
Users & Organizations
- New user created
- User updated
- Organization created / updated
-
Agent Activity
- Ticket assigned to agent
- Agent group changes
- Ticket escalation
-
SLA & Metrics
- SLA breach events
- First response time
- Resolution time
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement OAuth 2.0 Authorization Code flow in
account-create.ts(handle subdomain-based URLs) - Create Zendesk API utilities in
utils.ts(handle cursor-based and offset pagination) - Implement sync logic in
schedule.tsfor tickets, users, and organizations - Convert Zendesk events to CORE activity format
- Add webhook support for real-time ticket and user events
- Add error handling and rate limiting
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- Zendesk API uses subdomain-based URLs:
https://{subdomain}.zendesk.com/api/v2 - Account subdomain must be captured during OAuth setup for all subsequent API calls
- Pagination: cursor-based (preferred) or offset-based; max 100 results per page
- Search API returns max 1,000 results per query, 100 per page
- Rate limits vary by plan: Essential (10 RPM), Team (200 RPM), Professional (400 RPM), Enterprise (700 RPM)
- Use incremental export APIs for bulk syncing:
GET /incremental/tickets?start_time={unix_timestamp} - Sideloading related resources with
includeparameter reduces API calls - Ticket audits provide full change history for each ticket
- Bearer token authentication:
Authorization: Bearer {access_token}
Resources
- Zendesk API Reference
- Ticketing API Introduction
- OAuth Authentication Guide
- Creating OAuth Tokens
- Webhooks API
- Search API
- Security and Authentication
Labels
enhancement, good first issue, integration, new-feature, new-integration