Configuration
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.
Members
(inner, constant) config :Object
Update const
with values specific to your project. See example configuration object below.
- Object
Name | Type | Description |
---|---|---|
admin | string | Admin will receive error notifications |
formName | string | The name of the form used to add responses to your spreadsheet |
recipient | string | 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 | string |
|
sheetId | string | Property |
sheetNameFilter | string |
|
subjectFilter | string |
|
sheetInfo | Object | The first column is set to 'A' by default. To use a different first column modify the |
// Sample configuration
const config = {
admin: "rstevens@example.com",
formName: "Site Survey",
recipient: [
"marketing@example.com",
"ceo@example.com
]
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(),
},
}