Technology: 02
Path: Technologies: Henosis: Proteus: Postman
Wednesday, 20 September 2017

Postman

Seamlessly integrating Email and Slack

Leonardo Kewitz
4 min readSep 21, 2017

Invisible has the (not so simple) mission of selling access to an infinite toolkit of tasks, an unlimited set of processes that can be triggered through a simple message. To deliver that we provide our clients with an interface to a Digital Assembly Line, a virtual assistant that is actually the combined effort of a world-wide team of agents.

Postman provides granular, thread-based access to this virtual assistant’s email for all our agents, seamlessly integrating e-mail inboxes and Slack while abstracting the whole email experience for our agents. Although solutions to connect Email and Slack already exist, none of them provide bi-directional connection between Slack an E-mail accounts.

For us, this means being able to have a team of agents working as the same virtual assistant and replying to Emails with real-time Slack Messages.

Delegating gets really interesting when you have a team of humans who already knows you.

Seamlessly adding e-mails to a well known workflow

So, how do we coordinate these processes? We looked at many different options and eventually settled on Slack for its good API access and intuitive UX (user experience) for having discussions around data. We delegate any task to an agent (or a group of agents) that will process that request following a set of instructions called a Process Book.

In our current model, every request becomes a short-lived channel. You can think of this channel as a temporary folder that contains a Process Book and the necessary context for executing the task. After being executed and the result delivered to the client, this “folder” is archived. Aside from that, channels provide a common workplace where multiple agents can share information and execute complex tasks together.

Given that most of our coordination and execution happens through Slack, how could we integrate E-mails in an intuitive way?

Slack provides several tools for us, and the one that we found most promising was Posts, which provide a way of commenting and replying to them as they were the real thread.

Comments are an intuitive way of engaging with a thread.

How we do that?

How do we represent a full e-mail in a Slack Post?

Translating things!

The first step is translating emails to Posts and back again. As you might know, e-mails are HTML files and Slack supports a primitive version of Markdown. The cool part is that both are directly compatible and with help of some libraries it’s totally possible (with some simplifications) to extract the information from that HTML and upload as a Post using Markdown.

The same is true for the opposite flow. When a user replies to that Post, we simply render the Markdown comment and send as an e-mail.

The same e-mail, represented in a Slack Post.

Attachments

Attachments are currently a bottleneck. Since Slack don’t allows us to include images or another file inside a Post, the only workaround we foundy was to include as a link.

To do that we actually download all the files attached to that e-mail and upload to a secure storage, which has a strict access in order to protect our client’s privacy.

Improving the workflow

Besides all the security reasons involving credentials and reducing context switch, there was a few significant improvements that became clear we could make using this tool.

As has been noted, the security and privacy of information are of prime importance in our business. The context needed to execute a task can vary from having just common public information to needing bank account access.

In order to execute more sensitive tasks we internally follow the principle of least privilege, which in practice consists in providing only the necessary information the agent needs to complete the task.

One of the advantages of abstracting the e-mail interface through Postman, is that now we can share only the vital e-mails during the delegation of a task. For instance, when a client delegate a task through an e-mail, we internally route this thread to a new instance channel, thus creating a sandbox environment that exposes just enough context to the agent accomplish that task.

In addition to being able to create these execution sandboxes, when an e-mail is routed to an instance the thread is automatically tied to the channel. This means that every e-mail received in the same thread will be automatically posted to that channel, keeping the agent up-to-date with any updates and allowing the communication to happen transparently through client and agent.

Conclusion

Providing an intuitive UX based on a third-party UI (user interface) required a bit of creativity. However, if you have the window to provide this kind of solution, the almost instant implementation and adoption by your team certainly surpasses the costs.

Having a virtual assistant as single interface for the agents is not only good for the client but it also helps us merge different communication mediums into the same execution workflow, after all, messages are messages.

Next

--

--

Leonardo Kewitz

Software Engineer at Invisible Technologies. None of us are as smart as all of us.