Skip to content

Using Google Apps to generate a simple site from a form

I was blue skying with a friend the other day and came up with checklist to build a simple canned website from a form submission, using Google Apps and Google Apps Scripting.

  1. User goes to a form.  (More on creating a form)
  2. User submits images, video links, text, email, background color, etc.
  3. That all goes into a google spreadsheet, which triggers the building of a site.  Here’s trigger info.
  4. You can automatically build a google site.  Here’s the api: site creation, page creation.  If you want your own domain name (example.com) I think you can do that, but you’d need to integrate with a DNS service to set that up–this part bears a little more investigating.
  5. If desired, you can generate the QR code for the site.
  6. If you need to tell the form submitter that the site is created, you can email them a link to the QR code so they can print it out.
  7. You can even remove content from the site via cron (see triggers link up above), though you can’t automatically delete the site.
  8. It’s conceivable you could even use google checkout to charge users beforehand (though this is a bit less supported).

What’s great is that you don’t need to have any tool other than a browser to build this entire stack.  Google is truly creating a toolkit/macro language in the cloud.

Google Maps is now charging

…if you reach a certain number of mapviews.  You have up to 25K/day mapviews free, which works out to just over 9 million map views a year.  My understanding of those limits is that they are per-business, not per domain or site.  Here’s the announcement on their blog.

Alternatives for javascript map generation:

Google Maps has made mapping ubiquituous (I’m sure Brian Timoney would agree), and in doing so has done the web a great service.  It will be interesting to see what happens as they try to charge for this service.

8z Real Estate Hackfest

Recently, at the company I work for, 8z Real Estate, we had a hackfest.  A hackfest, for those not in the know, is a chance for employees to spend time working on whatever they want to do but don’t have time to do during the normal business day.  It’s also known as ‘FedEx day’ because you build something to ship in one day.

The idea is to give everyone a chance to do something work related that they want to do, or try, or explore, but don’t have time to because of the hustle and bustle of work life.

From the post at Atlassian (as far as I know, the originators of FedEx day).

[The] task must be something “out of the ordinary”. This is hard to define – but basically the spirit is that you can’t do something you would normally do. It’s a chance to attack all those “I wonder if XYZ would work… “, “It would be nice if we could… ” small … tasks that always get pushed off in the heat of battle.”

We had about 11 employees and contractors gather at the office.  Our schedule:

  • 8:00 Employees arrives, normal work begins
  • 10:00 Employees cease normal work
  • 10:00 – 10:30 brainstorm session
  • 10:30 – 10:45 pick projects
  • 12:00-1:00 eat lunch (Snarfs!)
  • 10:45-4:15 continue work on project
  • 4:30-5:30 present projects (8 min presentation) and drink a beer

We had an 2 hour block of work at the beginning of the day because we needed to, but after that, almost no one did everyday work.  Phones were off, email was closed.

The type of projects selected varied.  Most folks weren’t developers, so we didn’t have a ton of shipped software.  But we had some really interesting ideas, ranging from investigation of interesting technologies (what’s coming down the pike with our e-newsletter sender, infographics) to outlines of business ideas, to refactoring of business processes.

The excitement of all working together, in one room, on different projects, for a fixed amount of time, with no interruptions was one highlight.  I also really enjoyed people’s varied takes on aspects of the business.  It was also impressive to see the skills that I didn’t know some people had (powerpoint, for one).  It was awesome how many good ideas we had, even though some of them would have taken a hackfest week to implement.

All in all, it was a worthy experiment and something every business should consider doing.

Image Recognition Automation Fail

I had a friend who asked me to take a quick look at a business problem he was having.  He had a set of photos (of vinyl record albums) that he was looking at to identify the artist.  After finding the artist, he’d do some additional categorization work and then push the image and metadata to a ecommerce site he is running.

He wanted a way to more quickly identify the artist and album, preferably without his intervention.

The first thing I suggested was Mechanical Turk, as this seemed like a great example of a Human Interaction Task.  However, my friend tried this and found it to be more work (mostly proofing, I think) than it was help.

He also pointed out that Google Image Search does exactly what he wants.  You can post an image or URL to it (you have to use the camera in the search box), and it will give you back like images, best guess for the image matching, and links related to the image.  Pretty cool!

However, there is no API for the new Google Image Search.  Sure, you have the old, deprecated Images API, but it doesn’t have access to post an image or a URL, just keywords.  A bit of looking around revealed this StackOverflow post, which deconstructs the new Image Search parameters.  However, the deconstructed URL gives back javascript which needs to be executed by a browser.  I looked briefly at Selenium and webdriver to do that, but couldn’t figure it out.

I also looked at Kooaba’s API, but they didn’t get back to me when I signed up for a free developer account, and their API only covers books, CDs and DVDs.  Also from a StackOverflow post, I looked at MacroGlossa and IQEngines.  Neither of them seemed to work–MacroGlossa wanted a category (and, shocker, vinyl record albums was not a category) and IQEngines let me submit an image wasn’t successful in identifying it.

I had to admit I was defeated.

Help A Reporter Out

This site, Help A Reporter Out/HARO, is a great resource for anyone with expertise in any field who wants to be better known. (It’s also a resource for journalists, but I don’t have any experience with that side of the site.)

To participate as a source, you sign up and then are sent three emails every work day. Every email consists of 35-50 reporter queries, grouped by area (‘Travel’, ‘Tech’, ‘Education’, etc). Included in each query is the deadline, name of the reporter (if provided), anonymized reporter email address, and media outlet. There’s also some advertising, but I tend to skip past that (although I did click once on an ad that led me to learn about Google Apps Scripting).

Once you get the email, you scan the queries and see if you can and want to respond to any. I recently responded to one, but before that I’d passed off a number of requests for information to other people. Such handoffs are a great way to help other people out, and it’s kinda fun–who doesn’t want to talk to a reporter? (Psst, if you’re looking for a job, sending over a reporter query related to a company’s business is a great way to build rapport with people there.)

As I said above, a few days ago I’d finally found a query I felt I could help with, and responded with an email answering the reporter’s questions. The reporter responded, and I ended up have a 10 minute phone call about the story. So even when you actually participate, it’s pretty low impact.

I will say the hardest part of participating in HARO for me is scanning the emails–scanning 150 queries a day wears me down. I’ve stopped scanning them all, but still check from time to time.

I just think this is the coolest example of something that the internet allows, but couldn’t happen (at scale) any other way. The costs, both in money and time, of sending out and responding to reporter’s queries would be just too high.

Running a Google Apps Script Once a Month

I needed a way to email a Google spreadsheet to my boss once a month, for some reporting purposes.  I could have put an entry in my calendar reminding me to do it, but I thought it would be a great time to try out the Google Docs scripting that I had read about for a year or two, and seen an AppSumo video about.  (I got the AppSumo video for free, from an ad on HARO.)

It was laughably easy to get write the actual script (here’s a great set of tutorials).  The only rub was Google doesn’t allow you to run scripts in month intervals, only hourly, daily or weekly.  A small bit of scripting got around that.

Here’s the final script (edited to remove sensitive data):

function myFunction() {
  var dayOfMonth = Utilities.formatDate(new Date(), "GMT", "dd");
  if (dayOfMonth == 05){
    MailApp.sendEmail("email@example.com", "Spreadsheet Report Subject", 
'https://spreadsheets.google.com/a/mydomain.com/ccc?key='+SpreadsheetApp.getActiveSpreadsheet().getId());
  }
}

I set up a daily trigger for this script and installed it within the spreadsheet I needed to send.

I really really like Google Apps Script.  I think it has the power to be the VB of the web, in the way that VB made it easy to automate MS Office, reduce drudgery, and allow non developers to build business solutions.  It also ties together some really powerful tools–check out all the APIs you can access.

Once you let non developers develop, which is what Google Apps Script does, you do run into some maintenance issues (versioning, sharing the code, testing), but the same is true with Excel Macros, and solving those issues is for greater minds than mine.

Pentaho Data Integration is damn cool

I have worked on two small projects with Pentaho Data Integration.  If you’re looking for a business intelligence tool that lets you manipulate large amounts of data in a performant way, you definitely want to take a look at this.  The version I’m working with is a couple of revisions back, but the online support is pretty good.  It’s way more developer-efficient than writing java, though debugging is more difficult.

Why is it so cool?  It lets you focus on your problem–validating and transforming your data–rather than the mechanics of it (where do the CSV files live?  what fields did I just add?  how do I parse this fixed width file?).  You can also call out to Java if you need to.

There is a bit of a learning curve, especially around the difference between transformations and jobs.  I bought my first tech book of 2011, Pentaho Kettle Solutions.  These projects weren’t even using Pentaho for its sweet spot, ETLing to a data warehouse, but I have found this to be an invaluable tool for moving data from text files to databases while cleaning up and processing it.

Source Code Escrow

Have you ever considered asking a software vendor to put their source code in escrow? I recently broached the topic with a vendor I was evaluating. They didn’t seem too happy about the topic (at first, they were a bit sarcastic [“does Oracle do software escrow?”] and then they deleted tech support forum post). I did a bit of research, and there doesn’t seem to be a clear consensus on software escrow. Here are two interesting articles: Are you just following the herd? and Source Code Escrow.

Just having started thinking about the topic, my thoughts are still up in the air, but here’s my first reaction. Source code escrow makes sense when the following conditions are met:

  • The software is not open source (duh)
  • The software is or will be crucial to your business
  • The company is small or the future of the company is up in the air
  • You (the purchaser) have the technical capabilities to support the software should you receive it, or you’re willing to invest in those who can
  • You are willing to pay more for source that will be escrowed

I think of source code escrow like a warrenty on a car, or a professional license of open source software (like RedHat or Alfresco). It’s not for everyone (a car mechanic isn’t going to buy the warrenty) but it’s a nice option to have. And, to stretch a metaphor, if you’re going to soup up your car and build a livelihood on it, it’s nice to have a warrenty.

Gray Tiles with Google Maps

Just thought I’d put this out there, since it caused me much gnashing of teeth.  If you have google maps on your site, you want to make sure that the max-width is set to none: div.google-maps img{ max-width: none; } or you’ll have a nice gray screen where your maps are supposed to be, but no error messages at all.  See below:

Google Map with Just Gray Tiles