as

Projects / Attendance Automator

Attendance Automator

A Google Apps Script library. Many Google Forms go in. One attendance sheet comes out. A form that already ran does not get counted again.

Why

A class that takes attendance in a new form every week ends up with a folder of response sheets and no total. Copying emails by hand double-counts the people who submit twice and drops the week you forget.

Diagrams

A solid outline is the path in the repo. A dashed outline is the alternative that shape is refusing.

A spreadsheet script calls the library with a folder, a spreadsheet, and a sheet. The log records a form that already ran. The next run skips it. Counts land on one sheet, per email.

flowchart TD
  forms["Folder of Google Forms"]
  log["Log sheet"]
  out["One attendance sheet"]
  skip["Already logged, skip"]
  forms --> log
  log -->|"not in the log"| out
  log -->|"processed before"| skip
  class forms,log,out,skip chosen
          

The duplicate check is the log of forms, not a hash of each response. The script you bind calls importFormsToSpreadsheet. The library is not a bound script you edit in place.

flowchart TD
  q{A form that already ran}
  q -->|"the log names it"| idem["Skip on the next run"]
  q -->|"count the responses again"| again["No log"]
  shape{How the code ships}
  shape -->|"add the library, call it"| lib["Apps Script library"]
  shape -->|"edit the bound project in place"| bound["A bound script"]
  class idem,lib chosen
  class again,bound rejected
          

Why this shape

The library is called from a spreadsheet script. The log is what makes a second run a no-op.
inA folder of formsOptional subfolder. RSVP forms can be skipped.
onceLog sheetA processed form is recorded. The next run skips it.
outOne sheetCounts per email. Names and the output sheet are arguments.

It is a library, not a bound script you edit in place. You add it to an Apps Script project and call importFormsToSpreadsheet with the folder name, the spreadsheet name, and the sheet name. The README’s example also takes a log sheet name and skipRSVP.

Where it breaks

The duplicate check is the log of forms, not a hash of each response. Edit a form after it has been logged and the new responses stay out until you clear that log entry. Two spreadsheets with two logs will each count the same form. And a form that does not look like attendance, if you did not mark it RSVP, still gets imported.