Twilio Flex + Zendesk - Embedded Voice Recording is an extension to the native Flex integration into Zendesk that automatically embeds Twilio Flex's Voice Recording as a Voice Comment in Zendesk. It leverages Twilio Functions as a RESTful API middleware between Twilio Flex and Zendesk.
Note: This extension is to be used concurrently with the native Flex integration into Zendesk
- Twilio Flex Account (Guide)
- Twilio Voice Recording - Enabled (Guide)
- Node.js v16.x.x only (Guide)
- Twilio CLI v5.3.3 or above (Guide)
- Twilio CLI Serverless Plugin v3.1.3 or above (Guide)
- Zendesk Instance with Twilio Flex Integrated (Guide)
Login to your Zendesk instance and navigate to Admin Center. Under Apps and Integration > APIs > Zendesk API, create a new API token.
You will need the following before proceeding:
- Zendesk Subdomain
- Zendesk Username
- Zendesk API Token
On your terminal, perform the following:
// Clone Project git clone https://github.com/leroychan/twilio-flex-zendesk-recording.git // Change to working directory cd twilio-flex-zendesk-recording // Install NPM Packages npm install // Copy sample enviroment file cp .env.example .env Configure the .env file using your preferred code editor with all the required values obtained from Step 1. You can leave ACCOUNT_SID=xxx and AUTH_TOKEN=xxx empty as it will be populated by default during run time.
Before you deploy, ensure that twilio profiles:list has an active account set.
Once configured and you are ready to deploy it, go back to your terminal and issue the following command:
twilio serverless:deploy After you have successfully deployed the Twilio Function, copy the the entire API path of /update-recording and head to Zendesk's Admin Center. Under Apps and Integration > Webhooks > Webhooks, create a new webhook
- Select a way to connect:
Trigger or Automation - Name:
Twilio Flex Integration - Description:
Embedded Voice Recording - Endpoint URL:
YOUR-TWILIO-FUNCTION-URL - Request method:
POST - Request format:
JSON - Authentication:
None
Head to Zendesk's Admin Center. Under Object and rules > Business Rules > Triggers, create a new trigger
- Trigger name:
Twilio Flex - Update Voice Recordings - Description:
Embedded Voice Recording - Conditions - Meet ALL of the following conditions
Status Less than ClosedSubject Text contains the following string: "New Ticket from Twilio Flex"Comment Text contains the following string: "Segment Link"
- Action:
Notify active webhook- Select your webhook created in Step 3- JSON Body:
{ "ticket_id": "{{ticket.id}}" }
Note: Modify the Trigger's Subject Text depending on your New ticket description configuration of Twilio Flex + Zendesk integration
Congratulations! You are now ready to start testing the Embedded Voice Recording on Zendesk!
Start by calling your associated Twilio Flex's phone number and accept the call on the Zendesk's Agent interface. Once you complete the task, you should see a new Voice Comment automatically appended onto the ticket.
MIT


