Blog

Getting Things Done

Monthly Archives: July 2010

How to handle incoming email with Webhooks

As mentioned in the previous post, Teambox now supports incoming email with webhooks. This allows users to create conversations, answer notifications and comment on tasks by email.

This is a technical post, so you may want to skip it unless you’re a programmer.

About processing incoming email

If you are running an application server in Ruby on Rails, PHP, Java or Python, it can be hard to connect your web application to email servers.

Some applications like mailman allow you to connect incoming email servers to your application, but then you need your own email server.

How to receive email without setting up an email server

For this, we’ll be using Sendgrid’s email servers. Sendgrid not only allows you to send email, but also to set up an MX mail server that turns incoming emails into POST requests. POST requests can be then processed by your application to process email instantly.

This means that you can set up a route on your application, and Sendgrid will ping www.yourserver.com/process with the From, To, Subject and Body parameters of the email. Your application can then use its logic to turn that into emails.

This is the way it works:

  1. First we set up a Sendgrid account.
  2. Once we’re logged in, we visit http://sendgrid.com/developer/reply.
  3. We will be accepting every address like *@reply.yourapp.com. For this, enter “reply.yourapp.com” in Hostname and “http://yourapp.com/process” in URL.
  4. Good. Now we need to set up a DNS record that tells users that emails sent to whatever@reply.yourapp.com need to be sent to Sendgrid’s mail server. For this, open your DNS settings and create an MX record for “reply.yourapp.com.” pointing to “mx.sendgrid.net.”.
  5. Wait some hours for the DNS to propagate. You can check it with “host reply.yourapp.com”. If it returns “mx.sendgrid.net”, it means you can use it. (It may take up to one day for Gmail and others to accept the changes).

Now, whenever you send an email to that address, your application will receive a notifications. You can check this on the server logs.

Example code for receiving emails

This is an example Ruby on Rails snippet that could handle incoming email. For the sake of simplicity, I’m skipping the validations, which should return an error code to Sendgrid in case the parameters are malformed, not present or invalid.

 
def post_from_email
from = params[:from]
to = params

Turbocharged incoming email

Teambox has supported processing incoming email since its beginning. Before, it would take some seconds to process this email, so users where left with the uncertainty of not knowing if it went through.

Today, we’ve taken incoming email to a new level. Email is now processed instantly, so it’s as good as posting an email reply on the web interface.

Technically, we do this by converting emails into webhooks. Instead of receiving emails on a normal POP3 or IMAP mail server, and then polling for changes every minute, we used Sendgrid to convert them into first-class application notifications that are processed instantly.

instant-email-replies

Try it

Send an email to yourprojectname@app.teambox.com and refresh Teambox on your browser. You’ll have a new conversation! More email commands available here.

This will soon allow you to email attachments directly into Teambox, too!

Attention to details

This had bothered me for some time: When a comment on Teambox spanned across several paragraphs, it would be very hard to answer. I would have to scroll up to certain section of the message and down to my comment box to reply.

The same applied to conversations on GMail and other apps.

This is how I solved it: Really long conversations now collapse to a fixed height, and have a scrolling bar to navigate through them. Still shows normally short ones, and it makes it much easier to reply without constantly scrolling up and down.

It’s also a one line fix: max-height: 350px

Do you know about other UI that adapt to unexpected content in a smart way? Share it on the comments.

scrolling

zero2infinity soars with Teambox

Ever wondered how our planet looks from above? Beyond the noise of the city, far away from the ground, past the atmosphere where we’ve always lived.

zero2infinity takes passengers somewhere over the rainbow, way up high. They are launching into the experiential travel business with a revolutionary Near-Space vehicle that will offer breathtaking views of our planet, so far only available to a privileged few.

You will be able to see the blue Earth and black Space from the comfort of a pressurized gondola being lifted by a balloon. This is the safest way to do it, while being environmentally friendly.

“We have already flown a nano-bloon, the first prototype which took high definition pictures and video”, said Jose Mariano López-Urdiales. “We will soon be flying a small mammal, then a larger mammal, and finally human beings.” Commercial flights are planned to start in 2014. The picture above is from a flight of their prototype, nano-bloon, carrying the Spanish soccer team’s jersey after their victory against Germany in the semi-final match of the 2010 World Cup.

Jose Mariano Lopez-Urdiales

“Starting up such an innovative project can get pretty hectic, managing contacts and work. It’s overwhelming!

Teambox really helped us getting everything in order. We always comment on tasks to keep everyone up to date on our status”

We asked Jose Mariano, which are your favorite Teambox features?

Files: “Before, we would email files to the whole group. This was especially troublesome when multiple people are working on the same file. You have to make sure that you edit the most recent one. Teambox lets you upload files. This way you always know where to find them and which one is the most recent.”

Replacing email: “You can alert other people to a task other than the person it’s assigned to. Simply by typing @ and the person’s user name in the task. It is really useful if you think the person you assigned the task to might need help.”

Tasks by context: “With our iterative design process, it was easy to confuse documents between the different iterations. In Teambox both tasks and documents are separated into Projects, saving us the time we would spend sorting through files until finding the correct one for a specific prototype.”

bloon-viaje-globo

Learn more about zero2infinity’s project

Request your API invitation now

api-v1

The requests to connect 3rd party applications to Teambox keep flooding in.

Developers are asking for a way to connect their own systems, post notifications or develop their own mobile and desktop clients.

We hear you and are almost ready to make it so! We’ve been in the lap working on this for the last several weeks, and are happy to say that we are about to release the official API version 1.0 documentation. It will be full of both examples and Ruby libraries.

We’ve been working on this for the last weeks, and we will soon release the official API version 1.0 documentation with examples and Ruby libraries.

If you would like to test before it’s officially launched, follow the link below:

Request your invitation to test the API before it’s officially released.

Photo: Coming soon…

Today, we started working on a new feature. The plans are there, and now there’s a week and a half of work before us.

For now, I’ll let you wonder what it’s about.

new feature

Rolling the dice in the office

Today at Teambox HQ, we had to decide who had to go buy pizza:

pizza-game

Simple as it should be.

New: Post from your home page

You can now post comments to any of your projects from your home page on Teambox.

comment from your home page

That means less clicking around to do a braindump of your ideas. Handy!

How much is One Million Dollars?

Are you sick of reading articles about how XXX raised 50 million dollars, or Y was sold for 350 million dolars, and not knowing how much that’s worth?

Don’t worry, we’re here to help you understand how much is 1 million dollars worth.

Let’s start from the beginning. What can you buy with…

$20.000?

A modest quantity, to start with. You could put it to different uses.

  • You could buy a nice car.
  • You could organize a concert for your neighborhood.
  • You could equip 5 soldiers with M16 assault rifles, or buy a light transport vehicle.
  • You could start a small family business.

20.000 dollar car

$200.000?

Getting better. That would be 10 cars, 10 concerts, 50 soldiers of 10 little shops. Or you could go for some of these:

200000 dollar apartment

$1.000.000

Your first million dollars! With it, you could own 50 cars, run 50 concerts, buy 250 rifles, operate a network of 50 stores, spend the year in 5 different houses, have 5 military vehicles or own 5 startups. But you could also…

  • Buy a luxury house, or a yacht.
  • Build a big park.
  • Buy an AMRAAM missile for medium range. Although I heard that Tomahawks, priced a bit higher, are free unless they strike the target.
  • Setup a manufacturing line.

amraam missile

$10.000.000 (ten million dollars)

At this point, people don’t longer see any difference. $10m and $100m sounds pretty much like the same thing, but they’re not.

$10m would get you 500 cars, 500 concerts, 2.500 rifles, 500 shops, 50 houses, 50 sports courts, 50 armored vehicles, 50 startups, 10 luxury houses, 10 city parks, 10 air-to-air missiles, 10 factories, or…

hospital

$100.000.000 (one hundred million dollars)

If you get here, you can buy 5.000 cars, run 5.000 for your friends and family, equip 25.000 soldiers, own 5.000 stores, 500 apartments, 500 sport courts, 500 military jeeps, 500 startups (do you even have that many ideas?), 100 luxury houses, city parks for 100 cities, 100 missiles, 100 factories, 10 private jets, 10 hospitals, 10 fighter aircrafts or:

  • A big hotel by the beach, or a movie about your life. If you get $100m, you probably have a good story for it.
  • A highway.
  • A military transport aircraft like the Airbus A-400M.
  • An airline.

hotel

$1.000.000.000 (one billion dollars)

If you ever reach this sum, give me a call before getting either 50.000 cars, 50.000 concerts, 250.000 assault rifles, 50.000 shops, 5.000 apartments, 5.000 armored vehicles, 5.000 startups, 1.000 luxury houses, 1.000 air-to-air missiles, 1.000 factories, 100 private jets, 100 hospitals, 100 fighters, 10 hotels, 10 A-400M airplanes or 10 airlines.

You’ll need to choose between an awesome army, an industrial cluster or a healthcare network. And you better find a good accountant. Other choices include:

  • Building your own city, like Banco Santander kinda did in Boadilla del Monte.
  • Build a high-speed train, maybe in California.
  • Get your own airplane carrier. Spain only has one, you could have another one.
  • Buy a well known cookie company.

aircraft carrier

$10.000.000.000 (ten billion dollars)

This is already pretty epic. You’d be at the level of some of the richest people on Earth. Enough cars for a small country (500.000), assault riffles for it too (2.500.000), enough stores for a whole country, 50.000 apartments, 50.000 military vehicles, 50.000 startups, luxury houses for everybody you’ve ever met, 10.000 missiles, 10.000 factories, 1.000 private jets, 1.000 hospitals, 1.000 fighters, a hotel in the beach for each of your relatives (100), 100 highways, 100 A-400M, 100 airlines, 10 cities, 10 high-speed train lines, 10 aircraft carriers, 10 public companies.

You’re finally as big as some countries! What next?

  • Buy a first class art collection
  • Build a tunnel connecting France and UK.
  • Launch your own satellite network.
  • Acquire an energy company.

Above $100b, you’d find companies like Apple and Microsoft. With this much money, wars could be financed, you could populate islands and start a space mission without problems.

What would you do with $1 million dollars?
paris-louvre-mona-lisa