First of all you need to know how agocontrol is working:
With an example:
I have a temperature sensor and when this device detects a temperature changing, the event "temperature has changed" is triggered. Agocontrol system catch this event and execute all actions associated to this event. The event "temperature has changed" is containing the sensor unique id (uuid) and the new temperature value.
Now you know how agocontrol is working so you should be able to create an action.
Agocontrol proposes an easy way to create these actions without any computer skills (or a little bit) using blocks construction. Dashboard is composed of:
Top area is composed of buttons:
The menu of the left is divided on sections:
Agocontrol section contains specific blocks that will allow you to interact with the home automation system:
By default, on construction you should see default blocks:
Building an action is really simple: drag and drop blocks from left menu to construction area and plug them together. Blocks inputs and outputs have type checking to drive you. Some blocks have little blue stars on top left corner, clicking on this star open a popup to add some features to the block.
You can find more info on Blockly as a language (i.e. not agocontrol related) at Blockly language documentation
You have 2 ways to save data between different script executions:
System variables are variables that own to agocontrol. You can declare them using dedicated config page (configuration->variables)
Some system program update those variables like agotimer that updates time associated variables (hour, minute...)
Those variables are stored by agocontrol and restored after agocontrol restart.
Under blockly, you can only update their values. You can't declare new ones using a script.
Just a reminder, but weekday value in event.environment.timechanged are Monday=1, Tuesday=2, Wednesday=3, Thursday=4, Friday=5, Saturday=6 and Sunday=7
Local variables are variables that own to your script. By default a variable lives during your script execution and finally is lost.
If you need a variable along all your script execution, you can prefix a local variable with "ago_". Those kind of variable will be stored at end of your script execution and restored at next script execution allowing you to do some stuff according to previous state. This script context has no hard storage, it means if agocontrol is stopped, you will lose this context Make sure to check if variable exists before using it or you will get script execution failure! Moreover, when you save your script, this context is cleared.
This example prints ago_persistentvar value each minutes
Examples of what can be done with Blockly can be found below, if you have questions relating to the examples please post on the 
Every Monday 01.37 send an email, with temperature + distance measurement to an email address
If today is an odd number day of the month, at 7pm turn on a switch for an hour then switches it off and turns another one on for another hour.
If temperature is rising above trigger value, then only send 1 email or sms until the temperature is below the trigger value. SMS script is this example have been disabled, but is usable if you enable it. First check if the ago_ variable is defined, if not then define. Use "ago_" in your variable, then the variable value will be remembered outside from your blockly script. With credit to Tang The textbox is combined with the temperature device property value and this provides the actual temperature to be included in the message
Upload your Blockly scripts there to teach and inspire other users here: