Email channel support in Twilio
As per Twilio documentation, we can bring email as a channel and leverage Task Routing capabilities easily as long as we can create a task and programmatically interact with the email service. They recommended an email service provider with REST API (like SendGrid) capabilities because of ease of use. However, we can use any Email provider for this purpose.
Gmail-based email channel support
Let's assume our support email is hosted on Gmail and we have a Flex-based contact support system in place where Agents handle chat and voice-based support. Now we want to extend our chat interface to handle email-based support conversations.
We will build a worker service using Gmail API that will listen to new emails. Once a new email arrives, we will use Twilio SDK to create a new channel and task. Once an agent accepts the task and they can respond to the customer's queries. Agent response will be further emailed to the customer using Gmail API.