Skip to content

How it works

Yash Totale edited this page Mar 5, 2021 · 6 revisions

How It Works

Creating & Sending Feedback Surveys

  1. The script runs at 11:30 PST every day using a scheduled GitHub Action
  2. It pulls Project Data from Airtable and, for each project, it uses the project registration date as well as the date a feedback survey was last sent out to decide whether or not to send a survey.
  3. If it decides a survey is necessary, it makes a post request* to a Google Apps Script providing the Success Metric questions of that specific project as well as other information to be included in the survey.
  4. The Apps Script then creates a Google Form and sends metadata about the form back to the main script.
  5. An email notifying the project's chapter to send the survey to the nonprofit is sent.

*We have to use Apps Scripts for Google Form creation as there is no JavaScript API for Google Forms yet.

Checking for Responses

  1. When a form is created (step 4 above), the Apps Script stores information about it (such as the form id, the id of the project it belongs to, the time period of the form, the responded status, and when it was sent) in a Google Sheet.
  2. Every day, the Apps Script has its own cron trigger during which it checks whether or not forms have been responded to using the information in the Google Sheet.
  3. If it detects a new response, it updates the Airtable success data and changes the "responded" status on the Google Sheet.
  4. If there is an error in pushing the data to the Airtable, an email is sent to the Social Impact committee informing them about the error.
  5. If the script detects that a feedback form has been lying dormant for a few weeks, it sends a reminder email to the chapter which was supposed to send the form to the nonprofit and asks them to ensure that the nonprofit has received the form.
  6. If the script detects that a feedback form has been dormant for a few months and a reminder email has been sent out, it marks that form as expired.