Profile cover photo
Profile photo
Andrew Roberts
Freelance Web/Google Apps Script Developer
Freelance Web/Google Apps Script Developer
Andrew's posts

Missing form submission triggers

The firing of form submission triggers seems to be very slow if they fire at all today. Anyone seeing the same (I'm seeing it on a couple of accounts)?

I'm wondering if having programmatically linked a form to a sheet and created the trigger could be an issue - although an intermittent one ???

Trigger IDs

When I create a trigger how come the ID returned when it's created is slightly different from the ID in the event object when the trigger fires?

For example on creating a trigger I get:


But the ID from the event is:


In this case it is three, but the last four numbers are consistently different so I can work with it just seems a bit weird??

Creating a form trigger from a web app

I've got a web app (deployed from a stand-alone script) that creates a new GSheet and GForm and then links the form to the sheet to store the responses.

What I would like to do is create an "on form submit" trigger from within the web app that fires on a form submission' get the whole thing working with one-click on the web app. I can create the trigger in the web app script but nothing happens on form submission, I have to create it from the script contained in either the new sheet or form for that - two clicks!

Would one-click be possible??

I could do this with an add-on but they aren't allowed on this particular domain.

Here's the question on SO:

Apps Script Early Access Google Group

Google, with all this talk of Early Access, is the Apps Script Early Access Google Group still used? 

Getting microdata (schema) with GScript

Does anyone have any experience/snippets for extracting's microdata from HTML with GScript?

I'm presently working on which I could probably get to run client-side eventually, but ideally I'd like to be able to run it server-side.

I've tried various HTML parsing functions that are out there but nothings seems to consistently manage to extract the data.


Post has attachment
Script to email form submission as a PDF

By popular demand I've created a version of my "PDF Creator" script that automatically emails a PDF of a form submission.

Post has attachment
const keyword

Google discourages the use of the const keyword as it's not supported by IE ( @const doesn't work in GScript. Most GScript is server side so it should be fine to use.

Does anyone use const?

P.S. I think I remember this being brought up before if anyone can point me at it.

P.P.S. Can anyone point me at the link that describes which ES6 features are supported in GScript. Thanks.

Post has attachment
*Interesting bit of pre-library history

Just came across this technique from the pre-library days.

This script loads the "library" from the host site and then runs it in an eval() to create a service object.

Paying for bugfixes

I've been having an interesting discussion with a client where they don't think they should pay my full hourly rate for bugfixes. I'd love to get the "Google Script" communities take on this as its a G Suite script (still getting used to the new names!):

Every software project is going to involve a degree of research and experimentation. We are bringing together a complex set of tools in a potentially infinite number of ways. We are designing and building a bespoke, custom product because an off the shelf solution does not already exist. Bugs (the software acting in an unexpected way) are an inevitable part of this process. The industry uses a R&D or “agile” approach to overcome this. For example I develop in small chunks, working with complete transparency through my journal and timesheet. Hopefully generating the trust that I have the skills to do the job and create something worth investing in.

So amongst other things, bugs can be due to:

Coding error – This is what could be construed as a developer’s “mistake”, an error in the way the coding language is used or simply making a typo. But with almost 25 years of programming experience under my belt and several years dedicated to JavaScript these will be minimal.

Limitations on what the technology will let you do – Google Apps imposes various quotas on things like execution time

How the technology is going to react in certain situations – the documentation may not describe our particular scenario and we have to try it out before we see how it actually works

New features breaking an existing one – In a complex system a change in one area may have unpredictable effects elsewhere

User Error – Making the code robust enough to cope with every user input has to be balanced against the time this would take, and if it would actually be possible. So the code may receive input that isn’t expected and act in an unwanted way.

I hope this helps explain how bug-fixing is an integral, equally valuable part of software development, along with designing, coding, testing etc.

If cost is an issue other things to keep in mind are:

Quantifying the savings – compare the actual cost savings the automation continuously generates through reduced admin man-hours, against your investment in software development.

Productising – there are a lot of industries that could find something like [your product] useful, so it could also be worth exploring productising it.

Post has attachment
Wait while more posts are being loaded