Automating your first template