Using Google For Work / Google Apps To Automate Giveaways

Raffle tickets rolled up waiting to be handed out.

Pulling a ticket blindly from the fishbowl, the winner was selected.  How many have seen this a time or two?

Vino Pair is excited to be a vendor in Kansas City's first annual, sold out Uncorked Event.  Wine makers from all over the world and local food trucks will converge on Union Station, March 26th. There are many giveaways that Vino Pair will be offering all the 3,000 attendees.  Does Vino Pair give out tickets and pull from a fishbowl, hat, etc? No, that's not scaleable with 3,000 people.  Plus, it's 2016.  Is there another, simple option?

Google For Work aka Google Apps, Google Forms, QR Codes, and a little Google App Script and Vino Pair has the following:

  • Easy way to get to Google Form via QR code.
  • Google Form that accepts first, last name, email.
  • Google App Script that gets the count of entries, picks a random winner.
  • Google App Script also emails the winner and Vino Pair.
  • Google App Script "Pick Winner" routine can be activated from a mobile device.
  • No computer is needed to activate winners, just a mobile phone with the Google Drive App.

Here's the Google Form that was used.

Google form editor page

Google form editor page


  • Most people coming to a wine event are going to bring their smart phones for photos.
  • If there's a group, someone in the group is bound to have smartphone that all can use.
  • Once the link is scanned at the booth, entries can be entered at the user's discretion.
  • Allows easy flow through booth using technology and eliminates the need for paper.
  • Some people will not be able to enter the contest and that's okay.
  • Email will work to notify winners so giveaway items are handed out same-day.

Recreating the example is simple.

Step 1 - Create a new Google Form

After creating the Google Form, nab the Form ID from the url.  See below - the ID is between the red lines.

google form url example

google form url example

Step 2 - Click the three dots in the top right of the Form editor page.  A menu will appear. Select the script editor from the list of options and your screen should look like the following.

Google script editor page

Google script editor page

Put the ID captured from the above step into the code below where it has -------------Google Form ID from URL------------.

function myFunction() {
 var form = FormApp.openById('-------------Google Form ID from URL------------');
 var formResponses = form.getResponses();
 var i = Math.floor(Math.random() * formResponses.length) + 0
 var formResponse = formResponses[i];
 var itemResponses = formResponse.getItemResponses();
 var winning_first_name = itemResponses[0].getResponse();
 var winning_last_name = itemResponses[1].getResponse();
 var winning_email_address = itemResponses[2].getResponse();

function sendemail(fname,lname,email) {  
     to: email,
     cc: "",
     subject: fname + " Is A Winner!!!",
     htmlBody: "Vino Pair Giveaway Winner Is = " + email + " -- " + fname + " " + lname + " - Please come to the Vino Pair booth to claim your prize!!"     

function onOpen(e) {
  var menu = FormApp.getUi().createAddonMenu(); // Or DocumentApp or FormApp.
  menu.addItem('Start workflow', 'myFunction');

Change the email routine to accurately reflect your giveaway.  Name your project.  Save the code and publish it. You need to enter a description of the code and accept some permissions on your Google Apps account.  It only takes a few seconds and your code is published, then it can be used in your Google Form.

The function called onOpen(e) fires when the Google Form is opened.  This code instructs this Google Form to add a menu option.  This is how it appears in the Google Form once it's published.

Click the puzzle piece to run the script and pick a winner.

Click the puzzle piece to run the script and pick a winner.

Step 3 - Now that the form is complete, it's time to create the QR codes. 

Googled 'QR Code maker' and this was the first result.  Just enter the url of the form into the QR code creator webpage and hit the create button.  You'll be able to download an image of the QR code after a moment from their sponsors.  Now, just print out the QR code and make it available at your booth.   When the code is scanned the user is taken to the form.  Here's a sample screen shot from an Android device.

google form on an android device

google form on an android device

Step 4 - Finally, the form security options will need to be adjusted in order to make sure customers can access your Google Form.   While on the Google Form page, click the gear and the make sure to change the setting to look like these settings below.

Google Forms settings

Google Forms settings

Save your settings.  To select a winner, open the Google Drive App, select the Google Form, and click the puzzle piece.

mobile google form edit view with google apps script puzzle piece shown

mobile google form edit view with google apps script puzzle piece shown

When the winner is selected, simply pull up the email that was cc'ed to you for verification purposes.  Done.


  • A person can enter multiple times, but could be eliminated if login was required.
  • The script does not remember who it picked previously.
  • A winner can win multiple times.

Obviously it needs a little work, but for only 15 minutes of work, the results were pleasing.


Shopify First Impressions

Having worked at Pro Athlete for 16 years, authored much of the E-Commerce software, and then managed the team who released code, to then starting, where everything is cloud-based and Shopify is the hub - changes everything.  

Shopify is designed like no other E-Commerce software I've ever seen.  There's no server-install, database passwords, or firewall ports to open.  There's no credit card gateways, fumbling with scripts or code (unless you want to), or web hosting.  Truest definition to Turnkey E-Commerce software that I've seen.

It seems like every week there's some new option that's being pushed out for Shopify Merchants to use.  Some I like and use, and others I do not.  That's not the point.  I'm getting great features for my website and paying a small subscription fee.  It's like there's a team of programmers working on my site 24/7.  There's is a team, but they are working on the platform that my site resides and since it's all cloud-based, new feature installs are button-clicks away.  When I engage the button and click it, I get enormous value.  I know what it takes, in some cases, to write that functionality and I just installed it in seconds.  Not to mention, I get a little jealous knowing just how simple it's gotten to start an E-Commerce Store on Shopify now.

Security is a big part of E-Commerce software.  Keeping the bad guys out and making sure all credit cards are safe requires some effort.  As the bad guys get smarter and more motivated, the effort required to protected your homegrown business assets with a quarterly PCI scan takes more resources, and can become counter-productive.  Shopify absorbs that layer of security, so as a shop owner and retailer, I don't need to worry about that and can focus on more important issues.

Integration of software can be another huge resource hog.  Especially enterprise software where specialized consulting is required and fees are charged in the hundreds per hour. Shopify offers an eco-system of apps to make installing add-on's a fun exercise. When something comes up, there's a directory of service providers all around the world that specialize in Shopify Apps / integration and are there to help.

There were a few issues that I ran into while setting up and I needed some help.  I dreaded the unknown, and potentially expensive consulting fees.  That's all I've ever known.  After reaching out to a few experts in South Africa, Australia, and New Zealand, I found someone to help.  Not only did they help, they recreated a copy of my entire store, inventory, and accounting system to showed how to properly solve my problems.  It was an amazing experience because the problems were fixed so fast and the cost was unbelievable.

Email templates are refreshing in Shopify.  Why?  The templates provided are for all kinds of communications. Just turn the store on and they are there.  That in itself, is a huge value.  Then, tailoring them to your needs is just as simple and straight-forward as the rest of Shopify.  It's simple to add logos, graphics and HTML to the emails, too.

Lifting the hood in Shopify reveals a mature liquid scripting engine and robust, yet simple theming system. There's a set of hotkeys or admin keyboard shortcuts to quickly move between screens in Shopify.  There's lots of liquid scripting variable cheat sheets programmers have authored.  There's a Shopify API wrapper for about every modern programming language.  Once you create a private app api key and plug it into a program, custom code can be run against your Shopify store front.  

Shopify, as a software development company, releases some amazing open-source projects, too. Vino Pair uses the dashing software as it's visualizations at the Parkville Commercial underground cave location to manage operations.  There's many pre-built widgets that can be plugged-in and integrated with outside services for real-time data flows which makes this dashboard software expandable and versatile.

Cheers shopify!

Cheers shopify!

Winning At eCommerce Product Reviews

Winning At Product Reviews - Just Remember CDSD


  1. Allow anyone to review your product. - You can always turn this off.
  2. Purchasers need simple, friction-less way to provide review for maximum conversion. - Inline form in email works best.
  3. Asking people to “help others” with their expertise works.
  4. Incentivize reviews at anytime, but at first it really helps momentum to create review content.
  5. “Be first to review this product” incentive.
  6. Amazon’s got a program called “vine” where they send products to customers for free, but they must write a review.
  7. Amazon touts the program as a method to showcase top reviewers, so there are requirements, but most can get it -
  8. Queue results for customer service / marketing teams - or outsource.  Auto-post could be disastrous.
  9. Profanity Filter / Skin Filter / Competitors Filter / Products Filter / Vendors Filter / Duplicate Review Filter / Similar Review Filter / Whatever you desire filter.  Just use filters.
  10. Must Q/A for other odds and ends - people are weird.
  11. Differentiate by tailoring reviews specifically for your product.


  1. Theme - Display everywhere with savior faire
  2. In product grid show stars.
  3. In quick view, show stars.
  4. Product marketing - show stars.
  5. On product page, above fold, show stars.
  6. Below fold, create clean review area showing summary, number of reviews, and scrollable list of reviews.
  7. Allow community voting.  Just allow one IP per product and obfuscate score to prevent gaming.  
  8. When lots of reviews for a product, don’t hide, overflow to a separate webpage page with buy box and canonical back to /product page.
  9. Create review tools using product filters that customers can use to slice and dice the products they want - use /reviews in the url to attract customers adding “reviews” to their search terms.
  10. Category landing pages need an aggregate rating for all product in grid - This is new.  


  1. Sitemap for content - Share with Google through webmaster central
  2. Submit product review feeds for PLAs -  -Share in Google merchant center
  3. Web site - markup for reviews, review-aggregates - Validate here -
  4. Off-site, use product comparison engines.
  5. When emailing customers asking for reviews, include other reviews for the same product - “See what others said”.
  6. When sending customers a marketing email, include product reviews in the email.
  7. When sending customers a marketing email, include highly reviewed, similar products in the email.
  8. Build extranet so partners can review their own product ratings, download results, and improve products on their own time.


  1. Create reporting system with criteria to organize and “filter” bad reviews for discussion.
  2. Meet with key product managers to discuss and fix problems with products.
  3. Meet with external vendors and suppliers to improve products.
  4. Review customer interaction with reviews on website using Analytics.
  5. Review KPIs