Google Translate API: HubSpot Ticket Routing Based On Language

By Ralph Vugts on Apr 26, 2024
Narrate this article

With the HubSpot Help Desk, conversation inbox, and ticketing system starting to mature nicely, we have been getting more and more requests on how we can further enhance and streamline the Ticketing process.

Recently, a client requested the ability to route a ticket to a different team based on the language used in the initial email. Unfortunately, there was no out of the box solution here from the HubSpot side so we started investigating how this could be done.

Google Translate APIs to the rescue! 

At Engaging, we love all things Google. There seems to be a Google service for anything and it's relatively easy and cost effective to spin things up. We quickly found the Google Translate APIs and started working on a solution to tag tickets with the correct language code from the incoming request. 

How did we integrate Google Translate into HubSpot? 

There were a few approaches here, but for our client the first point of contact with their customers was via the conversation inbox. After a HubSpot ticket was created, we required the language to be set to allow for routing via a workflow. 

We created a HubSpot workflow that triggers off conversations being started in HubSpot:
Google Translate API HubSpot Ticket Routing Based On Language

In this HubSpot Custom Coded Action, we make several API calls. 

  • We pull the HubSpot conversation by thread ID
  • Pass the conversation body to the Google Translate API and detect the language used
  • Pull the HubSpot Ticket ID
  • Then finally apply the detected language to a dedicated ticket property

Once all this has been completed, the ticket routing workflow can then easily route to the correct international team. 

Results

  • The support team now saves time assessing and assigning tickets
  • No more accidental assigning of tickets to the incorrect team if they were not sure what language was being used
  • Customers are happier as they get answers to their questions faster!

One of the best parts of running an agency is getting asked to come up with creative solutions to problems we have never come across before. Please reach out if you would like help implementing something similar for your business. 

Ralph has been developing websites and systems for nearly 20 years. Passionate and curious, he’s an a-typical developer who understands how users interact with the systems he builds. He understands that systems need to be human-friendly. Ralph loves working in an industry that is constantly changing and disrupting itself.

Get in touch, We love to talk