To take the screenshot of your canvas, simply use the system action, "Snapshot Canvas."
The screenshot is set as a URL, so you will need the browser object.
To save the screenshot as a file, use system condition, "On Canvas snapshot" - (Browser action) "Invoke download," Then set the URL as CanvasSnapshot and the filename to whatever you want.
Example Image: