Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7907957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:41:57+00:00 2026-06-03T11:41:57+00:00

I recently made a Google Apps Script that runs onSubmit of a Google form.

  • 0

I recently made a Google Apps Script that runs onSubmit of a Google form. It automatically emails the info captured in the form to the approving manager in an html format.

I’ve attempted to add additional workflow by including two buttons in the email – “Approve” and “Deny”. However, I am unable to attach a function to these buttons (e.g., the submit button would forward the email to X, etc).

I would appreciate if anyone could help me out with this – I haven’t been able to find/understand online solutions, and I fear I may be over my head in this. Below is my code:

     function notfiy(e) {


  var username = e.values[1].toString();
  var requestfor =  e.values[2].toString();
  var location =e.values[3].toString();
  var department = e.values[4].toString();
  var phonenumb = e.values[5].toString();
  var extension = e.values[6].toString();
  var approver = e.values[7].toString();
  var computer = e.values[8].toString();
  var monitor = e.values[10].toString();
  var accessories = e.values[12].toString();

  var html = 
    '<body>' +
    +'<h2>'+ username + ' has submitted a request to purchase equipment for ' + requestfor + ' </h2>' + '<br>' + '<br>' +
    'Location: ' + location +
    '<br> Department: ' + department +
    '<br> Phone Number: ' + phonenumb +
    '<br> Extension: ' + extension +
    '<br> <br> The following materials have been requested for purchase: ' +
    '<br> <br> Software: ' +
    '<br> Computer: ' + computer +
    '<br> Monitor: ' + monitor +
    '<br> Computer Accessories: ' + accessories + '<br> <br> The ship to location for said materials is :' + '<br> <br> <br> <br>' +

    '<input type="submit" value="Approve" />' + '<br>'+
    '<input type="submit"  value="Deny" />' +
    '</body>'; 

    MailApp.sendEmail(approver, "Equipment Request: " + username, 'No html body);', {htmlBody: html});


}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:42:08+00:00Added an answer on June 3, 2026 at 11:42 am

    I’ve added a video tutorial about how to get this done:
    https://sites.google.com/site/scriptsexamples/home/announcements/emailapprovalusinggooglescriptandaform

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I made a GET form recently.But the problem is that it is highly vulnerable.You
I recently made a c# printer management tool that uses a WCF service which
Hi I have recently made this script to rename files I scan for work
I'm working on a site that is using Facebook Connect and recently made some
Just recently Google made available Maps GL on the GMaps platform. We have an
I recently made the statement to a colleague that: NullReferenceExceptions should never be explicitly
Recently, I have found this site made by Google Team. http://www.20thingsilearned.com/ So far I
I recently made a Mootols script for my website. Using Fx.Morph, I succesfully created
Google app engine seems to have recently made a huge decrease in free quotas
I have recently made a new homepage for my company so that employees can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.