Time required. 45-60 minutes.

Prerequisites. A Google Workspace account with admin access, a running n8n instance, and a Google account that can create GCP projects.

Employee Request Form Setup Guide

This guide covers everything you need to set up the Employee Request Form workflow end to end.

The workflow lets employees submit any HR request (title change, pay change, equipment, schedule change, or other) through a single Google Form. The manager receives an approval email, and the decision is written back to the same Sheet row along with who decided and when.

Unlike the PTO workflow, this one does NOT touch Google Calendar or any directory service. It uses only Gmail and Google Sheets — two credentials in n8n.


How the Flow Works

  1. Employee submits the form — The Google Form submission triggers an Apps Script on the linked Sheet. The script reads the new row by header name, looks up the row number, writes that row number back into a row_number column so the workflow can find this row later, and posts the form data (signed with HMAC) to the n8n form webhook.

  2. n8n logs the request and notifies the manager — The workflow updates the same Sheet row to set Status = Pending, then sends the manager an HTML email with two buttons: Approve and Reject. The decision URL is derived from the form webhook URL by replacing /employee-request-form with /employee-request-decision and appending the row number plus all relevant fields as query parameters.

  3. Manager clicks Approve or Reject — The decision webhook is a GET request (no body, no HMAC). It validates the action, reads the current row to confirm it has not already been actioned, then updates the row to set Status to Approved or Rejected, fills in the Decision timestamp and the Decided by (manager email), and emails the employee with the outcome.

  4. Already-actioned protection — If the manager clicks an Approve or Reject link a second time, or the link is shared and clicked by someone else, the workflow reads the existing status and responds with a friendly "Already Processed" page instead of re-applying the decision.

Both paths (form submission and decision) are handled by a single workflow using two webhook triggers — the same pattern used by the PTO workflow.


Form Fields and Sheet Columns

The Google Form must have these six fields, in any order. The Apps Script matches them by header label, not position, so you can reorder the form fields freely:

Form field Sheet column header Required?
Employee name Employee name Yes
Employee email Employee email Yes
Manager email Manager email Yes
Request type Request type Yes (short answer)
Details Details Yes
Effective date requested Effective date requested No (optional)

The Request type field should be a short answer so employees can describe their request type freely. The Details field should be a long-form text field (paragraph) where employees can elaborate.

In addition to the Form Responses 1 tab, the Apps Script setup function also creates an Error Log tab with its own columns:

Column Type Description
timestamp date ISO 8601, logged when an error occurs
error_type string validation_error, duplicate_error, or step_failure
employee_email string From the triggering record
employee_name string From the triggering record
node_name string Which node failed
error_message string Human-readable cause
resolved string Always "No" on insert; you can edit to "Yes" when resolved

The Error Log tab stays empty during normal operation. It only gets populated when something fails (missing fields, API errors, etc.).

The workflow also writes these columns to the Form Responses 1 tab automatically. The Apps Script setup function adds them to the sheet and the workflow sets values on the existing row:

Column Set by When
row_number Apps Script On form submit (used to match the row when a decision comes back)
Status n8n Pending on form submit, Approved/Rejected on decision
Decision timestamp n8n On decision (ISO 8601)
Decided by n8n On decision (manager email)

Copy the Google Form and Google Sheet

  1. Visit tl-hr.com and enter your license key to access the configurator
  2. Download your pre-configured workflow and copy the Google Form and Google Sheet templates provided
  3. Make copies of both into your Google Workspace account

Link the Copied Form to the Copied Sheet

  1. Open your copied Google Form
  2. Go to the Responses tab
  3. Click the Link to Sheets icon (looks like a spreadsheet with a link)
  4. Select Select existing spreadsheet
  5. Choose your copied Google Sheet from the list
  6. Click Link
  7. Google Forms will create a Form Responses 1 tab with the 7 form columns. Do not add any extra columns to this tab yourself — the setup() function will add the n8n-managed columns after linking.

Create/Setup Google Cloud Project (if not created yet)

This workflow uses only the Gmail API and the Google Sheets API. You do NOT need the Admin SDK, Calendar API, or a Service Account.

Enable Gmail API (skip if already done)

  1. Go to console.cloud.google.com
  2. Select your project
  3. In the left sidebar, go to APIs & Services → Library
  4. Search for Gmail API
  5. Click on Gmail API in the results
  6. Click Enable

Enable Google Sheets API (skip if already done)

  1. Go to console.cloud.google.com
  2. Select your project
  3. In the left sidebar, go to APIs & Services → Library
  4. Search for Google Sheets API
  5. Click on Google Sheets API in the results
  6. Click Enable

Create OAuth Consent Screen (skip if already done)

  1. Go to APIs & Services → OAuth consent screen
  2. Choose Internal (since this is for internal use)
  3. Click Create
  4. Fill in the required fields:
    • App name (e.g. "n8n")
    • User support email — select your email from the dropdown
    • Developer contact email — enter your email
  5. Click Save and Continue
  6. On the Scopes step, click Save and Continue — you can skip adding scopes here since n8n handles this automatically
  7. Click Back to Dashboard

Create OAuth Client (skip if already done)

  1. Go to console.cloud.google.com
  2. Select your project
  3. Go to APIs & Services → Credentials
  4. Click Create credentials → OAuth client ID
  5. Application type → Web application
  6. Name the OAuth client (e.g. "n8n")
  7. Authorized redirect URIs → https://your-n8n.com/rest/oauth2-credential/callback
  8. Click Create
  9. Copy Client ID and Client Secret

Note: You will only see the client secret once, so make sure to copy and/or download the JSON.


Connect Credentials in n8n

You only need two credentials for this workflow: Gmail OAuth2 and Google Sheets OAuth2. No Service Account, no Calendar, no Admin SDK.

Create the Gmail Credential (skip if already done)

  1. Open your n8n instance
  2. Click Credentials in the left sidebar (or Overview → Credentials)
  3. Click Create credential in the top right
  4. Search and select Gmail OAuth2 API
  5. Paste your Client ID and Client Secret from the OAuth client step
  6. Click Sign in with Google
  7. A browser window will open. Sign in with the Google Workspace admin account
  8. Grant the requested permissions
  9. You will be redirected back to n8n. The credential will show as connected

Create the Google Sheets Credential (skip if already done)

  1. Open your n8n instance
  2. Click Credentials in the left sidebar (or Overview → Credentials)
  3. Click Create credential in the top right
  4. Search and select Google Sheets OAuth2 API
  5. Paste your Client ID and Client Secret from the OAuth client step
  6. Click Sign in with Google
  7. A browser window will open. Sign in with the Google Workspace admin account
  8. Grant the requested permissions
  9. You will be redirected back to n8n. The credential will show as connected

Find your Credential IDs in n8n

Each credential you create in n8n has a unique ID. You need these IDs to configure your workflow.

  1. Open your n8n instance
  2. Click Credentials in the left sidebar
  3. Find the credential you need and click on it to open it
  4. Go to the Details tab
  5. Copy the ID field

You need two credential IDs:


Want to skip the manual setup?

Our templates include a configuration tool. Enter your details once and download a ready-to-import workflow. View templates →

Configure the Employee Request Form Workflow

  1. Go to https://tl-hr.com/configure/employee-request-form-google-workspace
  2. Enter the passcode (provided by your account)
  3. Fill in the form:
Field Description
Company name Your company name
n8n webhook URL (base) e.g. https://your-n8n-instance.com/webhook/employee-request-form — the form webhook path. The decision URL is derived automatically by replacing /employee-request-form with /employee-request-decision.
Google Sheets ID The long string from your Sheet URL: https://docs.google.com/spreadsheets/d/THIS-ID/edit
Alert email Email to receive notifications if any step fails
Gmail credential ID The ID from the Gmail credential in n8n
Google Sheets credential ID The ID from the Sheets credential in n8n
  1. Click Download Workflow JSON to download the configured workflow
  2. Click Download Apps Script to download the configured Google Apps Script file

Important: The Apps Script is installed on the Google Sheet (not the Form). The script uses a Sheet-based trigger that fires when a new form response row is added. This allows it to read the row number, write it back into the sheet, and pass it to the workflow so the workflow can update the correct row when the manager approves or rejects.


Import the Apps Script into the Sheet

  1. Open your copied Google Sheet
  2. Click Extensions → Apps Script
  3. In the new window, the Code.gs file should be empty
  4. Open the downloaded employee-request-form-google-workspace-appscript.gs file in a text editor
  5. Copy and paste the entire contents into the empty Code.gs file
  6. Select setup in the function dropdown and click the Run button
  7. Approve the permissions when prompted
  8. You will see Execution started and then Execution completed in the log
  9. Close the Apps Script editor

The setup function will:


Import the Workflow into n8n

  1. Create a new workflow in n8n
  2. Click the kebab menu button (three dots) on the top right
  3. Select Import from file
  4. Select the downloaded employee-request-form-google-workspace-configured.json file
  5. Click Save to save the workflow
  6. Click Publish to set the workflow live

Important: Every node mutation in n8n via the API only saves a draft. After import, you MUST click Publish to make the workflow live. The production webhook URL hits the published (active) version. Without publishing, the webhook will keep returning 404.


Ready to automate?

The full Employee Request Form workflow includes the complete workflow, Apps Script, error handling, automatic retry, and the configuration tool. Setup takes 30-60 minutes if you follow this guide.

Test the Workflow

1. Submit an Employee Request

  1. Open your Google Form and submit a test employee request using your own email and manager's email
  2. Use a recognizable value in the Details field (e.g. "Test request please ignore") so you can spot it in the sheet

2. Verify the Initial Submission

  1. Open your Google Sheet and find the row in the Form Responses 1 tab
  2. Verify the row has Status = Pending
  3. Verify the row_number column matches the actual row position in the sheet
  4. Check that all form fields are populated correctly

3. Verify the Manager Receives the Approval Email

  1. Check the manager's email inbox (or your own if you used the same address)
  2. Verify the email contains:
    • The employee's name and email
    • The request type and details
    • An Approve link with action=approve and row=<the-row-number> in the URL
    • A Reject link with action=reject and row=<the-row-number> in the URL

4. Test the Approved Path

  1. Click the Approve link in the email
  2. You should see a confirmation page saying "Approved!"
  3. Verify the following happened:
    • The employee received a confirmation email
    • The Sheet row updated to Status = Approved with a Decision timestamp and Decided by set to the manager's email

5. Test the Rejected Path

  1. Submit another employee request through the form
  2. Click the Reject link in the email
  3. You should see a confirmation page saying "Declined"
  4. Verify the following happened:
    • The employee received a rejection notification email
    • The Sheet row updated to Status = Rejected with a Decision timestamp and Decided by set to the manager's email

6. Test the Idempotency Check

  1. Click the same Approve or Reject link from the email a second time
  2. You should see an "Already Processed" page (HTTP 200) instead of re-applying the decision
  3. Verify the sheet row was NOT modified by the second click

7. Verify Error Handling

  1. Intentionally submit a form with missing required fields (e.g. leave the Details field blank, or use a request type outside the five allowed values)
  2. Verify the form submission is rejected and the error is logged in the Error Log tab
  3. The webhook response should be HTTP 400 with a "Validation Error" HTML page
  4. For step failures (e.g. if you revoke the credential in n8n and submit again), verify the error is logged to the Error Log tab and the configured alert email receives a notification