I'm trying to teach myself Google Apps SCript and javascript, so forgive if a stupid question. I'm basically interested in learning for business automation of basic workflows etc.. Approval process / mail merge etc. I've seen the examples in Developers page for GAs and other youtube demonstrating how to do this type of scripts. I've had some success in creating a workflow with mail merge, document creation..
What I'm curious is the proper or best practice in developing these types of workflows and use of Functions. The above workflow is one large function with a doGet() to generate a HTML page.
Would it be consider better to break the large function, which onFormSubmit, creates a template, reads data from a forum submitted spreadsheet, writes into a the template replacing %keys%, create a document and attaches to email, deletes document and sends email, in to multiple smaller functions. One for each action i.e create a template or send email etc etc. Then just have the functions call each other by passing parameters??
What is considered proper or best practice / approach for workflows like this??