I wasn't sure where I should post this. I hope this is the right place.
I have a Google Form, the responses are automatically fed into a Google Sheet when the form is filled out. As I'm the Owner I have setup the default Google Notifications that tells me the Form has changed whenever the Google Form is filled out:
The process is: Google Form filled in > Google Sheet updated with responses from Form > Email Notification to my email address
I have shared the Google Sheet to another user in my business. They have Edit rights to the Sheet. I want this user to also receive a notification when the form has a change.
So process would be: Google Form filled in > Google Sheet updated with responses from Form > Email Notification to mine and the other users email address
I've searched online as it isn't possible in Google Apps yet (it only notifies the owner). It was advised to create a custom Google Code on my Google Sheet like this:
function myFunction() {
MailApp.sendEmail("myemailaddress@mybusiness.com","Notification - Change in Spreadsheet","Notification - There has been a change in the Spreadsheet. Please view the change here: (I've put the url of sheet here) ");
MailApp.sendEmail("theotheruser@mybusiness.com","Notification - Change in Spreadsheet","Notification - There has been a change in the Spreadsheet. Please view the change here: (I've put the url of sheet here) ");
}
When I run this code from the Code Editor it sends me and the other user the custom Google Code notification email which I want.
When I fill in the form, the responses update in the Sheet, I get a email notification from the official Google Notifications of the change. The other user and I do not get the custom Google Code email notification though.
I've had a look at the Google Code website on the Triggers section but not sure how to write this part. I think I need to write a trigger on the code that says when the Sheet has changed run the custom code.
So Google Form filled in > Google Sheet updated with responses from Form > change in Google Sheet sets off a trigger > trigger runs custom Google Code > the other user and I receive the custom Google Code email notification.
Can anyone help with the trigger code part or even be able to recommend a different solution?
Thanks.