create google contact from form

69 views
Skip to first unread message

clay

unread,
Jun 2, 2012, 9:36:18 PM6/2/12
to forme...@googlegroups.com
i have been using formemailer for several years and it has been a great tool for our business;  have been trying to learn how to have my form/spreadsheet create google contacts as my clients fill in the fields.  have created a simple test form with first name, last name, email and used the script below:

function onFormSubmit(e) {
 var timestamp = e.values[0];
 var firstName= e.values[1];
 var lastName= e.values[2];
 var emailAddress= e.values[3];
  ContactsApp.createContact( firstName, lastName, emailAddress );
  }
the trigger is set on form submit but so far none of my tests have actually created a new contact;  is there anywhere to get some help building this kind of script and can i use it in conjunction with formemailer?

Henrique G. Abreu

unread,
Jun 3, 2012, 12:13:44 AM6/3/12
to FormEmailer on behalf of clay
Yes, you can definitely use such script in conjunction with FormEmailer.
The place to get help is Stackoverflow, under the google-apps-script tag.

Just a tip, to get better help, it's good that you specify your problem fully. e.g.
Are you getting any errors? Or does it just silently fails (which is unlikely)?
Since you can not run such a function directly, set up the trigger notifications to send you the errors immediately and test it multiple times.

Regards,
Henrique G. Abreu


--
You received this message because you are subscribed to the Google Groups "FormEmailer" group.
To view this discussion on the web visit https://groups.google.com/d/msg/formemailer/-/omt010AXdbUJ.
To post to this group, send email to forme...@googlegroups.com.
To unsubscribe from this group, send email to formemailer...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/formemailer?hl=en.

clay

unread,
Jun 3, 2012, 12:54:01 AM6/3/12
to forme...@googlegroups.com
my trigger is:


Events
notifications

i set the notifications to immediate but so far no failures and no new contact created;  i am not getting any errors but seeing nothing created

my spreadsheet test is very simple:
Timestamp firstName lastName emailAddress
 6/2/2012 23:38:18 clay testbarber cst...@gmail.com
6/2/2012 23:48:56 testclay testbarber cst...@gmail.com

i tried stackoverflow but no solutions offerred yet.  i assume that the google contact account will be the same account as the google docs account that i am working in

To unsubscribe from this group, send email to formemailer+unsubscribe@googlegroups.com.

clay

unread,
Jun 3, 2012, 12:55:41 AM6/3/12
to forme...@googlegroups.com
my trigger is set to fire on form submit - the paste did not show up correctly

Henrique G. Abreu

unread,
Jun 3, 2012, 1:05:17 AM6/3/12
to FormEmailer on behalf of clay
Ok, I've found your question on stackoverflow. Let's continue there.
http://stackoverflow.com/questions/10791179/automatically-create-google-contact-from-my-google-form

Henrique G. Abreu
Reply all
Reply to author
Forward
0 new messages