Send Email to a Team Room with VSO Service Hooks and Zapier
If you haven’t read up on some of the great work the VSO team is doing around Service Hooks, you should do so now. It’s a great, easily-consumable, extensible way to integrate VSO with other tools you may use. Service Hooks can also make VSO even easier to leverage in your organization.
In this post, I’m going to address a question I get from time to time: “The Team Rooms are great. Can I send an email to VSO and have it show up in a Team Room?” With a service hook, sure!
To do this, I’m going to use Zapier, a free service that allows you to build triggered actions between systems (called “zaps”). They just so happen to have a service hook into VSO, and an email parsing service that they provide themselves (they give you an email address to use, and it parses emails received at that address to perform in subsequent actions).
Here’s what I did:
I head over to Zapier and sign up for an account. They have several plans, including a free one.
I select to create a new Zap
When asked to choose a trigger or action, I select the Zapier Email Parser
Note that it ask me to also set up a parser mailbox at https://parser.zapier.com. I went over there real quick and set one up:
After creating a parser account, I set up a parser mailbox (this is effectively an email address that captures and parses email messages).
You’ll get an screen like this, with an email address for you to send to.
Send an email to the cryptic email address on your screen, and soon after it will capture the email and take you through the remaining steps to set up a mailbox parser. This will allow you to later customize the display of the email message in the VSO Team Room.
Once that’s done, on the page where you’re setting up your “Zap”, select “New Email” as the action under the “Zapier Email Parser”.
On the right side (“..Do This.”), select Visual Studio Online, and “Send Team Room Message” as the corresponding action. Your “Zap” should look like this:
I click the “Continue” button, which takes me to step 2, where I’m asked to connect to my Zapier Email Parser account, which I do. I click “Test this Account” verify.
After clicking “Continue” again, I’m taken to step 3, where I specify my VSO account.
I select the account I want to use, authenticate to it and authorize Zapier to access it. I can also give it a friendly name. When I’m done, it looks like this (in my example), after testing it.
I click “Continue” again, and am taken to step 4 where I specify triggers for the email parser. I simply choose the mailbox that I set up earlier.
Note that I can add custom filters if I want. For this example (all I’m using this mailbox for is VSO Team Room messages), I’m not.
I click “Continue” to go to step 5. On this step, I specify the Team Room that I want my emails to be pushed into (in my case, I choose “Awesome Calculator Team Room”), and set up the message that will be posted (based on the fields that you set up when you created your Zapier Email Parser mailbox. Here’s what mine looks like:
Lastly, I click “Continue” one more time to go to step 6. This step lets me test my Zap.
Let’s test it! I click on the “Test Zapier Email Parser trigger” and choose the sample data set to use (it will be the content from the test email you sent earlier to set up your mailbox).
I head over to the VSO Team Room. And voila! There it is!
That’s really it! Now any time someone sends an email to that garbled email address set up via the Zapier Email Parser, the email will be parsed and posted to the Team Room.
A couple suggestions:
- Keep the email somewhat cryptic so no outsiders can guess it (the Parser will let you customize it).
- Use a Welcome Page on your VSO project site to tell team members what the address is.
Now to be fair, there are other services that can help you respond to email events – the one depicted here was simply a straightforward one for me to figure out. This is a simple example – I’d love to hear what extra fun people are having with service hooks.
Hope this helps!