This is a FastAPI webhook that listens for Zendesk ticket updates and forwards the details to a Telex.im channel.
- ✅ Receives Zendesk webhook requests.
- ✅ Extracts ticket details (subject, status, priority, message, requester).
- ✅ Forwards the ticket update to Telex.im.
- ✅ Uses environment variables for security.
- ✅ Implements async HTTP requests with
httpx. - ✅ Deployed on Koyeb for scalability.
git clone https://github.com/telexintegrations/zendesk-integration.git
cd zendesk-integrationpython -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windowspip install -r requirements.txtCreate a .env file in the root directory:
TELEX_CHANNEL_ID=your_telex_channel_id
ZENDESK_WEBHOOK_SECRET=your_zendesk_secret #if you want to validate ZenDesk requestsStart the FastAPI server locally:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload- Push your code to GitHub:
git push origin main
- Go to Koyeb and create a new service.
- Connect your GitHub repository:
- Select
https://github.com/telexintegrations/zendesk-integration - Choose
main.pyas the entry point. - Set up environment variables (
TELEX_CHANNEL_ID,ZENDESK_WEBHOOK_SECRET).
- Select
- Deploy and monitor logs:
koyeb logs -a your-app-name
Use Postman or cURL to send a test request:
curl -X POST "https://ratty-goldarina-kenward-15941202.koyeb.app/zendesk-integration" \
-H "Content-Type: application/json" \
-d '{
"ticket": {
"id": 12345,
"subject": "Delayed Delivery",
"requester": {"email": "customer@example.com"},
"status": "open",
"priority": "high",
"description": "My order is late.",
"latest_comment": {"body": "Still waiting for an update."}
}
}'Expected Response:
{"message": "Sent to Telex"}Make sure pytest is installed: Not implemented yet
📩 Author: Kenward-dev
🏢 GitHub Organization: Telex Integrations