A simple PHP script to export Zendesk users to a 3CX-compatible phonebook XML format and Google Contact CSV file.
- Exports all Zendesk users
- Supports both email and phone contacts
- Generates 3CX-compatible XML
- Generates Google compatible CSV
- Saves raw API responses for debugging
- Handles pagination automatically
- PHP 7.0 or higher
- cURL extension
- Zendesk API access
- Composer
-
Clone the repository:
git clone [repository-url] cd [repository-name]
-
Install dependencies:
composer install
-
Configure environment:
cp .env-example .env
Then edit
.env
with your Zendesk credentials.
Edit the following variables in .env
:
ZENDESK_DOMAIN=your-domain.zendesk.com
ZENDESK_EMAIL=[email protected]
ZENDESK_API_TOKEN=your-api-token
- Configure your Zendesk credentials in
.env
- Run the script:
php export.php
- The script will generate:
3cx_phonebook.xml
: The final phonebook filegoogle_contacts.csv
: CSV file compatible with Google Workspace Contactsdebug_json/
: Directory containing raw API responses
3cx_phonebook.xml
: The main phonebook file in 3CX formatgoogle_contacts.csv
: CSV file compatible with Google Workspace Contactsdebug_json/zendesk_response_page_*.json
: Raw API responses for debugging
This project is open source and available under the MIT License.
Federico Colbertaldo - ScIEnzY