How to Use Google Forms and Apps Script to Build an Automated Approval Workflow

The Manual Approval Bottleneck

In almost every organization, certain actions require a manager’s signature. Whether it is an employee submitting an expense report, a developer requesting server access, or a marketing coordinator asking for budget approval, the standard workflow is deeply flawed. An employee fills out a form, an email is sent to a manager, the manager eventually replies “Approved,” and the employee manually logs the approval in a spreadsheet. This process is slow, the emails get lost in busy inboxes, and there is no centralized, auditable record of the decision.

By combining Google Forms, Google Sheets, and a few lines of Google Apps Script, you can build a fully automated, professional approval workflow. The manager receives an email with two buttons (Approve / Reject), and clicking a button instantly updates the central database.

Step 1: Set Up the Google Form and Sheet

  1. Create a new Google Form for your request (e.g., “Expense Request”). Add fields for the Employee Name, the Amount, and a Description.
  2. Go to the Responses tab in the Form and click Link to Sheets. Create a new spreadsheet.
  3. Open the newly created Google Sheet. You will see columns for the Timestamp, Name, Amount, and Description.
  4. Crucial Step: Add a new column at the end of the sheet and name it Approval Status. This is where the script will log the manager’s decision.

Step 2: Write the Email Trigger Script

We need a script that automatically emails the manager the moment an employee submits the form.

  1. In the Google Sheet, click Extensions > Apps Script.
  2. Delete the default code and paste the following. (Replace [email protected] with the actual email).
function sendApprovalEmail(e) {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var row = e.range.getRow();
  
  // Get the submitted data (Assuming Name is Col B, Amount is Col C, Desc is Col D)
  var name = e.values[1];
  var amount = e.values[2];
  var desc = e.values[3];
  
  // The web app URL will be generated in Step 3
  var webAppUrl = "YOUR_WEB_APP_URL_HERE"; 
  
  var approveLink = webAppUrl + "?row=" + row + "&action=Approved";
  var rejectLink = webAppUrl + "?row=" + row + "&action=Rejected";
  
  var htmlBody = "<h2>New Expense Request</h2>" +
                 "<p><b>Employee:</b> " + name + "</p>" +
                 "<p><b>Amount:</b> $" + amount + "</p>" +
                 "<p><b>Description:</b> " + desc + "</p>" +
                 "<br><br>" +
                 "<a href='" + approveLink + "' style='padding:10px; background-color:green; color:white; text-decoration:none;'>APPROVE</a> " +
                 "&nbsp;&nbsp;&nbsp;" +
                 "<a href='" + rejectLink + "' style='padding:10px; background-color:red; color:white; text-decoration:none;'>REJECT</a>";

  MailApp.sendEmail({
    to: "[email protected]",
    subject: "ACTION REQUIRED: Expense Approval for " + name,
    htmlBody: htmlBody
  });
}

Set the Trigger

  1. In the Apps Script editor, click the Clock icon (Triggers) on the left sidebar.
  2. Click Add Trigger.
  3. Choose sendApprovalEmail, select event source From spreadsheet, and select event type On form submit.
  4. Click Save (and authorize the script when prompted).

Step 3: Write the Web App (The Button Click Handler)

When the manager clicks the “Approve” button in their email, they are actually clicking a URL. We need a web app to catch that click and write the decision back to the sheet.

Return to the Apps Script editor and paste this second function below the first one:

function doGet(e) {
  var row = e.parameter.row;
  var action = e.parameter.action;
  
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  
  // Write the decision to Column E (the 5th column)
  sheet.getRange(row, 5).setValue(action);
  
  return HtmlService.createHtmlOutput("<h2>Success! Request " + action + ".</h2><p>You can close this tab.</p>");
}

Step 4: Deploy the Web App

  1. In the top right corner of the Apps Script editor, click Deploy > New deployment.
  2. Click the gear icon and select Web app.
  3. Under “Execute as”, select Me. Under “Who has access”, select Anyone (so the manager doesn’t need to log in to click the button).
  4. Click Deploy.
  5. Copy the long Web app URL.
  6. Paste that URL into the webAppUrl variable in your sendApprovalEmail function from Step 2.

Conclusion

You have just built a serverless enterprise application. When an employee submits the Google Form, the manager instantly receives an email with the details and clickable buttons. Clicking “Approve” instantly writes the word “Approved” directly into your Google Sheet, providing a seamless experience for management and a perfectly auditable database for accounting.

RELATED POSTS

  • How to Force Google Sheets to Automatically Recalculate Formulas Every Minute
  • How to Automatically Send an Email from Google Sheets When a Cell Value Changes Using Apps Script
  • How to Connect Google Data Studio (Looker Studio) to a Google Sheet
  • How to Share a Google Doc as a PDF
  • How to Delete All Your Google Activity
  • Get the best tech tips delivered straight to your inbox.

    Join thousands of readers mastering Apple, Google, Microsoft, and Linux.