How to send emails with Google Assistant / Google Home

I got a Google Home Mini for $19 last Black Friday, and my family has been having fun with it. My kids like to ask it questions and play music on it. I’ve set it up with voice shortcuts so my kids can say, “Call mom” or “Call dad” to phone me from the Google Home itself (in case of an emergency). It works as a regular Bluetooth speaker and it also knows many useless party tricks.

But most interesting to me is I now have a natural language voice interface for all my projects! With the Google Home / Google Assistant, I can control things with my voice, like how Tony Stark talks to J.A.R.V.I.S. And as someone who was born before the Internet, it is amazing to me that I can do this with a $19 device that sits on my kitchen counter.

But what good is an “Assistant” if it can’t send emails? Not very, if you ask me. So in this guide, I’m going to share with you how I set up my Google Home Mini to send emails. By the way, this works for any Google Assistant interface (like on your Android phone), so it works even if you don’t have a Google Home.

To send emails with Google Home, there are 2 ingredients: IFTTT and Gmail. I’ll assume you have a Gmail account, so we’ll just focus on setting up IFTTT.

IFTTT is a free service at IFTTT stands for “If this, then that.” Or more specifically, “If x happens, then do y.” IFTTT hooks up with all kinds of standards and protocols and services so that you can replace the x and y with anything.

Some example IFTTT “recipes” are:
If it is dark outside, then turn on the lights.
If it is going to rain tomorrow, then disable the sprinklers.
If the temperature drops below ___, then set thermostat to ___.
If you tell Google Home “Email Joe and say ___”, then send gmail to with ___ .

I’m going to explain how to do that last “recipe”. It’s not that hard, and just a matter of setting up IFTTT.

1) Make a new “If this then that” applet on Google Assistant will be the “this” part of the recipe and Gmail will be the “that” part.
2) Connect Google Assistant to your IFTTT account. You can program it to trigger an action when you speak a special phrase.
3) Connect a Gmail account to your IFTTT account. It does not have to be your main Gmail account. You can make a new account just for IFTTT mails. When you say your special phrase to Google Assistant, you can program it to send a special email.
(More detailed instructions here.)

Next, I’ll show you how to configure a Google App Engine web app to receive emails. This setup can be used to relay information to your smart devices or control them for free. (I’ll be using it to control my home sprinkler system.)

LG Optimus Dynamic – perfect cellbot phone?

It is the cheapest, full-featured Android phone that I’ve found. Only $20 on Amazon NEW. It feels like finding hidden treasure because the only reason it’s so cheap is that the phone is targeted for the bottom market. And, normal people who buy the phone later add minutes to use it as a phone. But not us! If everyone did what we want to do with the phone, they’d lose money because there’s no way this package can be produced and sold for a profit at $20. So shhhh… let’s just keep this between you and me.

Here’s what you do after you get it:

  1. (optional) Root it. That link takes you to a super simple one-click script and all you need is a PC and the USB cable that came with the phone. I don’t know why I rooted mine, but it’s Android and you can, so why not? You could install this custom ROM too if you want (I didn’t). And if you screw something up like I did, you always go back to “stock” with this.
  2. Install SL4A — the Scripting Layer for Android. This lets you interface with Android and everything your phone’s hardware allows… from a Python script.
    * Install the APK
    * Menu > view > interpreters
    * Menu > add > Python
    * Install the Python APK > OPEN the Python app > Install Python (+ whatever modules you want, like pySerial + pyBluez)

  3. In SL4A, go to Menu > view > interpreters > Menu > start server
    (Note the IP address and port, e.g.

  4. From your PC, write a simple Python script called to talk to the server on your phone:

  5. Notice the “import android” above. That’s from here. Download and put it next to above.
  6. python
  7. CHEER

The hardware isn’t great and it’s still on Gingerbread, but I’m pretty sure it’s still more powerful than NASA’s Lunar Lander. It’s just a steal at $20 for the nice package. Battery life is super and everything works fine. It even has an external micro SD slot! Oh one thing you might want to upgrade for our example above is the Text-to-Speech voice. Gingerbread is old so you don’t get Google’s latest TTS software. So I downloaded IVONA. It’s free, it works for Gingerbread and I like Amy’s UK English voice.

By the way, the SL4A website taught me that I’m not the first brilliant person to think of using smartphones for robots. And, the term for robots that use smartphones is Cellbots. But it still makes me wonder why people still want to mess with things like a $30 XBee WiFi module. Especially when phones like the Optimus Dynamic gives you WiFi (plus everything else) for $20. Who knows.

Happy Hacking!

Robot Kit – Day Two

We started making tracks

You took two hours to finish your dinner, so it looks like we won’t be doing much else tonight.

I downloaded pygame. I was going to try plugging a joystick into my laptop, then see if I can get Python to see joystick inputs. That’ll be one part of the puzzle to drive the robot by joystick. (I used the 64-bit pygame and pyserial here.)

We’ll see!

I’m still amazed by how far technology has come. When I was a kid not everyone had PCs, and there was a time when PCs alone cost a few thousand bucks. Now kids will get to play with robots. Many things have made robotics cheap: sensors, batteries, computers, microcontrollers, smartphones.

Update: I couldn’t resist. It was late but I was excited to continue so I let you stay up a little longer. You napped earlier anyway so it’s okay.

Oops too long

Rock not included

Just right

How does it work?