--
You received this message because you are subscribed to the Google Groups "NV Autocrat Add-on" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nv-autocrat-add...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/nv-autocrat-add-on/486eb41b-40c0-4a41-8ae1-c692d25d7cdbn%40googlegroups.com.
Hi Joe,
Sure, I’ll be glad to fill in the gaps. I am doing something analogous to your solution, but we needed the ability to run this in close to real time (start to finish in just a few minutes).
There are 2 spreadsheets: spreadsheet ‘A’ is a database of trouble tickets used by Facilities at the organization where I volunteer. I coded this system to allow anyone to create a trouble ticket, and for staff to update these tickets as work is done. This spreadsheet has (for the purposes of this Autocrat-related post) 3 sheets: the Active ticket sheet, the Completed ticket sheet, and the response sheet for the form submission that triggers our 5 Autocrat jobs. And it also includes (of course) the 5 Autocrat jobs that report on the Active and Completed tickets. (Note that the Active and Completed ticket sheets are not response sheets. The ticket creation and modification response sheets are part of a 3rd spreadsheet and script, which pushes the processed data to spreadsheet ‘A’, thus avoiding triggering the Autocrat jobs.)
Spreadsheet ‘B’ is the one that has the response sheet for the form that allows staff to request ticket reports. Based on user input (specifying up to 5 different reports), its script clears the necessary columns and rows in spreadsheet ‘A’s Active and/or Completed sheets (e.g., rows associated with “To Be Assigned” tickets), does a SpreadsheetApp.flush() followed by a 10-second wait so that all write requests are propagated to spreadsheet ‘A’, then submits the form associated with the response sheet in Spreadsheet ‘A’ to trigger the 5 Autocrat jobs.
This script then monitors the Google Drive folder where the Autocrat jobs deposit the requested report files; when all the expected files are found, it attaches them to an email describing the reports, and sends it to the person that requested the reports. It then deletes the report files from the Drive folder so it is ready for the next report request.
The Autocrat jobs all create PDFs to be deposited in a specified private Drive folder, and all 5 are configured to respond to a form submit trigger; but I do not use their emailing ability because it is too limited (can’t specify the body contents or recipient at execution time).
And that’s about it. Let me know if you have any other questions.
Dennis
To view this discussion visit https://groups.google.com/d/msgid/nv-autocrat-add-on/CAPWPTORg0h83m8otO2uqY5kU2kwn1pavb11AVz%3DDq5G03-JaNA%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/nv-autocrat-add-on/0de701dc5aa0%24ae2af3f0%240a80dbd0%24%40gmail.com.