One problem with running things from html service with is that you don’t have access to logging and execution log, so it’s difficult to debug. I like to run my profile components inline first to make sure they work. Here’s how you can simulate running this stuff from in the context of a normal apps script.
This function takes your profile and executes the named function, and passes over the data just as would happen if it was called from
We can call that, passing each of the individual run profiles, and emulate passing the data from the previous stage just as happens when being orchestrated by the html service. Of course you can only run one thing at once, but this allows you to test all your profiles in a much more visible environment.
Notice that I use functions to set up the profiles. I use exactly the same ones when running this for real. That way I can be sure I’m testing what I’m planning to use in real life. Here’s the example for the reduce function.
Later on, when I run this for real, I put it all together like this
You may also find this post useful, if you have some unserializeable objects to deal with. How to pass non stringifyable objects to html service

For more snippets like this see Google Apps Scripts snippets