Google Script Email Autoresponse

Using Google Script for your Email autoresponders

Google Autoresponder Script

When you create a form the responses will be stored in Google Sheets which acts as the database. Go to the Sheet by clicking one the form responses. When you are in the sheet go to the tools menu and select "script editor".

Using Google Script Editor

You need to create a new project. Call it "Google Form Autoresponder" or whatever you want. Doesn't really matter. Now you need to copy and paste the following code. Edit the code according to your own variables.

/* Send Confirmation Email with Google Forms */
function Initialize() {

var triggers = ScriptApp.getProjectTriggers();

for (var i in triggers) {
ScriptApp.deleteTrigger(triggers[i]);
}

ScriptApp.newTrigger("SendConfirmationMail")
.forSpreadsheet(SpreadsheetApp.getActiveSpreadsheet())
.onFormSubmit()
.create();

}

function SendConfirmationMail(e) {

try {

var ss, cc, sendername, subject, columns;
var message, value, textbody, sender;

// Enable variables such client name and subject to be placed in body and subject.
// This will depend on your form.

var clientname = e.namedValues["Name"].toString();
var tutorsubject = e.namedValues["Subject/s"].toString();

// This is your email address and you will be in the CC
cc = "yourname@yourdomain.com";

// This will show up as the sender's name
sendername = "Your Name";

// Optional but change the following variable
// to have a custom subject for Google Docs emails
// to have a variable in subject you would use the following code
// subject = tutorsubject + " tuition enquiry";
subject = "Tuition Enquiry";

// This is the body of the auto-reply
message = "Hi " + clientname + ",<br><br>Further to your enquiry about our tuition services. I have allocated you a tutor coordinator who will be in touch shortly. <br><br>Information about our rates can be found <a href=http://google.com>here</a>. <br> <br> If you have any queries please let me know. <br><br>Kind Regards, <br>Your Name<br>Title<br>www.google.com <br>Phone Number<br><br>";

// This code places the respondents details in the email in case they want to check their submission.
ss = SpreadsheetApp.getActiveSheet();
columns = ss.getRange(1, 1, 1, ss.getLastColumn()).getValues()[0];

// This is the submitter's email address
// Make sure you have field called Email Address in the Google Form
sender = e.namedValues["Email Address"].toString();

// Only include form values that are not blank
for (var keys in columns) {
var key = columns[keys];
var val = e.namedValues[key] ? e.namedValues[key].toString() : "";
if (val !== "") {
message += key + ' :: ' + val + "<br />";
}
}

textbody = message.replace("<br>", "\n");

GmailApp.sendEmail(sender, subject, textbody, {
cc: cc,
name: sendername,
htmlBody: message
});

} catch (e) {
Logger.log(e.toString());
}
// FOR ASSISTANCE WITH GOOGLE SCRIPT AND OTHER GOOGLE QUERIES GO TO GOOGLENESS.COM
}

Once you've copied the code. Click save. From the program drop down menu click "start". Now click "run" which will run the start program. Google will ask you to authorize the program. You need to give permission for the program as the autoresponder will be sent from your gmail account.

You can make changes to the autoresponder as you wish. For more help you can contact me.

Gmail Tip

Make sure your autoresponder has no more than three snippets of information. People rarely read further than this.

Gmail Accounts and Import

Gmail Tip

Use Google Docs for autoresponders to ensure delivery. Why? Because Gmail rarely blocks mails from their own servers.

Gmail Accounts and Import
Create Gmail Filter
Advantages using Google Drive

Twelve advantages of using Google Drive

Google Drive

Google Drive provides a platform for you to manage your documents and files. It  integrates all the other Google apps to help organize your personal and business affairs. Here are some of the advantages of the resource.

 

1. Free

The best thing about Google Drive is it is free. You get 15 GB of storage free which is for Gmail and Drive.

2. Multiple Devices

Google Drive can be accessed on any device. It is responsive and can be used on your mobile, tablet or desktop.

3. Preview

You can preview your files via Drive on your browser. You don't need to install the program in which the file was created.

4. Collaborating

When you share your Google documents via Drive you can allow recipients to edit. Users can collaborate with multiple users working on the same document simultaneously.

5. File Organization

You can drag and drop files or folders intuitively. This allows you to organize your Drive whether you are in your web browser or on your Device's internal hard-drive.

6. Security

Google Drive encrypts your data to ensure that it is secure. Your data is backed up on multiple servers in case of emergency. You can individually decide which files to share.

7. Search

As expected Google Drive makes it very easy to find your documents. You simply type in a keyword search and it lists the files containing that word. You can also search by date and document size.

8. Syncing

Google Drive automatically syncs your files and folders. When you update files on any of your devices the changes will be updated. This works in the background so you don't need to do anything yourself.

9. Sharing

You can share any of your Google documents via Drive. Simply type in the email address of the person you would like to Share it with. You can also send a clickable link to the document or post publicly.

10. Remote access

You can access your Google Drive from anywhere in the world on any device. Data is stored on Google servers so all your need is an internet connection and your login details.

11. OCR

Documents scanned into Google Drive can be searched using optical characteristics. So old archived documents (non-text files) can still be indexed.

12. PC Integration

Google Drive creates a folder on your PC which is a mirror of the online Drive. Syncing occurs while you're online. The folder can be accessed even while Offline.

Google Search Different Locations

Google Results in different locations

How to view Google results in different locations.

In my previous article I dealt with Googling your business. Now we'll look at using Google Adsense's preview tool to view search results when browsing in other countries. This is especially important for businesses looking for multi-regional growth.

When someone searches for your business while browsing in another country will they find you? Where do you rank in the search results? Let's look at how to use the tool.

Google SEO Tip

Site security is becoming more and more important. Install an SSL certificate to improve search rank.

Using the Google Adsense tool

You don't need to be logged in or have a Google Adsense account to use the preview tool. Simply go to their page here to start.

I'll use Cape Town Tutors, a company whose SEO I manage to explain results and give a few more tips to improve your rank. 

You need can change the city or town you want to search from on the left hand side. Also change the Google Domain as this will be the domain that the browser will access.

Google SEO Tip

When it comes to SEO, honesty is the best policy. Create good quality, original content that is relevant to your site.

Geolocation Search Country Google Adsense Tool

A look at the Google Search results

We rank top for "Cape Town Tutors" in a number of countries. I tried searching ten and they were all the same. We see that the Google business page comes up first again and again.

However, if we search for "Tutors Cape Town" which is a more logical order of the words we see different results. For different cities and countries the ranks change. 

Lets analyze the results:

Google your business

Google your Business

Googling Your Business

The best way to start using Google to grow your business is to "Google it". Find out what other people see when they do a search. 

When people search for your business what do they see? Do you rank first in the search results? Are you even on the first page? If you're not on the first page you have work to do. Start by setting up your Google Page so that Google knows you are open for business.

Let's Google one of the businesses who's SEO I manage, Cape Town Tutors

 
 

Google SEO Tip

Consider naming your business what you do and where you are. Cape Town Tutors contains the key search words "Tutors" and "Cape Town". When people search for tutors in Cape Town it increases the chances of a higher google rank.

Google your Business results

Google Search results

All is in good order. We see that the business comes up first. It's Google business page is on the right with photos and reviews. This is an important advert for your business. Make sure you have the right photos. Google also displays reviews from both Google and around the Web including Facebook reviews.

We see that because I was logged on there is an option to add photos and edit information about the business.

 

Google SEO Tip

Google search results in different regions by using the Google Adwords preview tool. When people in different cities or countries search for your business this will show you what they see.

Go to Google Adwords tool
Google your Business results UK
Google your business

Tips to improve your Google Business Page

First Google Your Business

The best way to start using Google to grow your business is to "Google" your business. Find out what other people see when they do a search. Do this when you are logged out of your Google account. Preferably from a different IP address. The Google algorithm tailors it's results for specific regions and for individuals. If you would like to see what people in different countries see when they search Google read this article.

So when people search for your business what do they see? Do you come up first in the Google search? Are you even on the first page? If you don't even come up on the first page you have work to do. Start by setting up your Google Page so that Google knows you are open for business.

Let's Google one of the businesses I run, Cape Town Tutors

 
 

SEO Tip

Consider naming your business what you do and where you are. Cape Town Tutors contains the key search words "Tutors" and "Cape Town". When people are searching for tutors in Cape Town it increases your chances of a higher google rank.

Google your Business results

Posting your photos

As the owner of your Google page you are able post your own photos on your management page.

When people find you in the Google search, often the first thing they look at is your pictures.

Confirm Google Business

First Google Your Business

The best way to start using Google to grow your business is to "Google" your business. Find out what other people see when they do a search. Do this when you are logged out of your Google account. Preferably from a different IP address. The Google algorithm tailors it's results for specific regions and for individuals. If you would like to see what people in different countries see when they search Google read this article.

So when people search for your business what do they see? Do you come up first in the Google search? Are you even on the first page? If you don't even come up on the first page you have work to do. Start by setting up your Google Page so that Google knows you are open for business.

Let's take the Googling one of the businesses I run, Cape Town Tutors

 
 
Create Google Business Page

How to create a Google Page for your Business

Set up a Business Page

If you want people to find your business on the web you need to set up a Google business page. First you need to be signed into your Google account.

Next you need to add your business info here. You will then be asked to add your area of service and then you simply click to confirm.

Google will then send a postcard to your address with a verification code. Postcards usually arrive within 22 days. When the postcard arrives you simply enter the code and boom you're done!

Confirm Google Business