config.js contains the configuration for the sendMail function. The config object must be completed for the sendMail function to work correctly. This object is passed to the sendEmail function with values from the current sheet environment via the procParams object.

Please see the documentation for the parameters in const config below. All parameter values are undefined by default.

  • unforswearing


(inner, constant) config :Object

Update const with values specific to your project. See example configuration object below.

  • Object

Admin will receive error notifications


The name of the form used to add responses to your spreadsheet


Add email addresses here. All form responses will be sent to any address added. Addresses may be for one individual or an array of addresses for multiple recipients.


emailFooter specifies the html string to be used in the emails that are sent from this script. Leave blank if you do not require an email footer


Property sheetID is required for this script to work properly Properties formName and sheetId will be extracted from const formName and const sheet


sheetNameFilter is used to extract the form name from the sheet name. the 'responses' default is typical for most forms.


subjectFilter is used to create the email subject from the sheet name. the text in the subjectFilter will be added to the sheet name to generate an email subject. if you do not want the additional text in the email title you can leave this section blank -- use ''


The first column is set to 'A' by default. To use a different first column modify the firstCol parameter to another column in your sheet.

// Sample configuration 
const config = {
  admin: "",
  formName: "Site Survey",
  recipient: [ 
  emailFooter: "<br />This is an automated message, do not reply",
  sheetId: "1234567890abcdef,
  sheetNameFilter: " Responses",
  subjectFilter: "New Submission: ",
  sheetInfo: {
    firstCol: "A",
    lastCol: "R", 
    // the lastRow parameter does not need to be edited
    lastRow: activeSpreadsheet.getLastRow(),