Damon Lim
Damon Lim

Reputation: 1

How can i get the hyperlink for "Approve", "Reject" work in Email using Apps Script

Problem: Seeking approval from manager upon each google form submission, the manager need to review the details and clicking approve or reject

BUT: how can i get the hyperlink for "approve", "reject" work

Desired solution: preferable Google Apps Scripts, when respondent click approve or submit, should save the response into google sheet and send second email to second layer approval

Tried: Able to extract detail from google form, but not able to perform approval and rejection button

Upvotes: 0

Views: 1612

Answers (1)

ziganotschka
ziganotschka

Reputation: 26836

A possible workflow is as following:

  • Use the form submit trigger - either for FormApp or, optionally, for SpreadsheetApp - if the responses are automatically stored in a destination sheet
  • Trigger onFormSubmit a notification email to be sent to the manager
  • Implement into the the notification email two links - one for approval, one for rejection
  • Create two WebApps - one that contains a script approving the form submission, copying the form response into a google sheet and sending emails to a second level approval; the second Web App contains a script that should be run in case of rejection (e.g. a notification email to the submitter about the rejection)
  • Use the Web App URLs as approval and rejection links in the notification mails to the manager

I hope those instructions are clear enough and helpful to you!

Upvotes: 1

Related Questions